imgInp.onchange = evt => {
const [file] = imgInp.files
if (file) {
blah.src = URL.createObjectURL(file)
}
}
<form runat="server">
<input accept="image/*" type="file" id="imgInp" />
<img id="blah" src="#" alt="your image" />
</form>
imgInp.onchange = evt => {
const [file] = imgInp.files
if (file) {
blah.src = URL.createObjectURL(file)
}
}
<form runat="server">
<input accept="image/*" type="file" id="imgInp" />
<img id="blah" src="#" alt="your image" />
</form>