Y
Y
yischyk2019-07-31 10:32:51
Images
yischyk, 2019-07-31 10:32:51

How to instantly display an image?

How is it possible for the user to enter a link to an image, and the image itself is immediately displayed?
There is a script

<script type="text/javascript">
function inputt() {
  var input_taker = document.getElementById('inputt').value;
  document.getElementById('blockss').innerHTML = input_taker;
}
</script>

<input type="text" id="inputt" onkeyup="inputt()">
<p id="blockss"></p>

but I need to be able to enter text in , but here the script does not work
.........
the user enters a link to the image into the input, and that image appears as a preview

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Zhikhor, 2019-07-31
@yischyk

this will help you (if I understood you correctly)
https://www.javascripture.com/FileReader

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question