HTML Input and create iFrame URL with user input? -
how can take below prompt , utilize user types prompt , turn iframe url below:
<iframe src="http://www.weather.com" sandbox="" seamless="" width="100%" height="200 </iframe> <html> <head> <script> function disp_prompt() { var sitename=prompt("please come in website:","www.anywebsite.com") document.getelementbyid("msg").innerhtml="your site: " + sitename } </script> </head> <body> <input type="button" onclick="disp_prompt()" value="click come in in website url"> <br><br> <div id="msg"></div> </body> </html> <html> <head> <body> <iframe id="iframeid" src="http://www.weather.com" sandbox="" seamless="" width="100%" height="200"></iframe> <form name="forminput" action="" method="get" id="input" onsubmit="document.getelementbyid('iframeid').src=document.forminput.site.value;"> website url: <input type="text" name="site"/> <br/> <br/> <input type="submit" value="submit"/> <br/> </form> <div id="msg"></div> </body> </html>
html
No comments:
Post a Comment