求大神幫忙看一下,為什么我在window.open();把"location=no"設置為NO了,還有就resizable=no這些都設置為NO了,但是打開新窗口時沒有效果呀。"width=800","height=600", 這兩個也是,打開新窗口后實際的高度寬度都不是設置的這兩個值。求大神幫看一下,謝謝哈。下面是我的代碼<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <script> window.onload = function() { var but_1 = document.getElementsByTagName('input')[0]; but_1.onclick = function() { window.open("http://www.baidu.com", "_blank", "width=800","height=600", "toolbar=no", "menubar=no", "scrollbars=no", "resizable=no", "location=no","resizable=no", "status=no"); } } </script> </head> <body> <input type=" button " value="打開彈窗 " /> </body></html>
關于JS window.open();的問題。
一只名叫tom的貓
2018-09-03 13:13:41