I would like to browse an image in my HTML script and then open a popup window in which the browsed image will appear.
Right now he is opening the image in the original script. But how can I pass it to the ShowImage.html popup?
function newwindow(event){
var pop = window.open("ShowImage.html", "Image","width=200, height=100");
document.getElementById('output');
output.src = URL.createObjectURL(event.target.files[0]);
}
<label>
Browse File
<input id="Browse" type="file" style="display: none" checked= true onchange="newwindow(event)">
</label>
<img id="output"/>
Aucun commentaire:
Enregistrer un commentaire