SAI YEWALE

Generation

typingsThu, 15 Dec 2022

write a javascript program to create option list of images and then display images in new window as per selection

<select id="mySelect"> <option value="http://www.w3schools.com/tags/smiley.gif">Smiley face</option> <option value="http://www.w3schools.com/tags/planets.gif">Planets</option> <option value="http://www.w3schools.com/tags/mountain.jpg">Mountain</option> <option value="http://www.w3schools.com/tags/sky.jpg">Sky</option> </select> <button type="button" onclick="myFunction()">Try it</button> <script> function myFunction() { var x = document.getElementById("mySelect").value; window.open(x); } </script> <script> function myFunction() { var myWindow = window.open("", "MsgWindow", "width=200,height=100"); myWindow.document.write("<p>This is 'MsgWindow'. I

Questions about programming?Chat with your personal AI assistant