关于Javascript入门课程 第二章的练习题
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>编程练习</title> <script type = "text/Javascript"> //新窗口打开前弹出确认框,是否打开 function Openwindow(){ var ifOpen = confirm(是否打开窗口?); if(ifOpen == true){ var url = prompt("请输入你要打开的网址","http://www.imooc.com")"; window.open('url','_blank', 'width = 400px,height = 500px,menubar :no,toolbar:no'); } } </script> </head> <body> <input name = "button" type = "button" value = "新窗口打开网站" onClick= "Openwindow()"> </body> </html>
执行完,点击“新窗口打开网页”没反应呢?