作业提交
来源:1-14 编程练习
慕村1994845
2020-07-18 17:27:27
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>1-14打开关闭窗口</title> </head> <body> <input type="button" value="打开慕课网" id="newOpen"> <input type="button" value="关闭本页面" id="quit"> <script type="text/javascript"> var newOpen=document.getElementById("newOpen"); var quit=document.getElementById("quit"); newOpen.onclick=function(){ window.open("http://www.imooc.com","imooc","width=500,height=500,left=200,top=100,toolbar=no,menubar=no,scrollsbar=no,location=no,stetus=no"); } quit.onclick=function(){ window.close(); } </script> </body> </html>
1回答
好帮手慕夭夭
2020-07-18
同学你好,代码实现正确哦。继续加油,祝学习愉快~