老师,麻烦帮我检查一下代码
来源:1-14 编程练习
慕9588112
2019-06-29 22:06:18
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>打开/关闭页面</title> </head> <body> <input type="button" value="关闭本页面" id="close"> <input type="button" value="打开慕课网" id="open"> <script type="text/javascript"> //获取按钮 var btn1=document.getElementById("close"); var btn2=document.getElementById("open"); //绑定事件 btn1.onclick=function(){ window.close(); } btn2.onclick=function(){ window.open("http://www.imooc.com","慕课网","width=600px, height=400px,scrollbars=no,left=100px,top=100px") } </script> </body> </html>
scrollbars=no 为什么这个效果没有实现,
我打开子窗口还是有滚动轴?
1回答
你好同学,scrollbars有兼容性问题,同学可以使用火狐浏览器测试,如下是没有滚动条的。
同学的代码效果实现了,祝学习愉快,望采纳。
相似问题