我需要一个用户无法刷新的弹出窗口。为此我正在尝试这个:
function openNewWindow(href){
alert("hello here");
var newWindow = window.open(href, 'newWindow',
'toolbar=no,location=no,directories=no,status=no, menubar=no,resizable=no,width=1024,height=400');
return false;
}
<a onclick="return openNewWindow(this.href);" href="newPage.html" >Click me</a>
新页面.html
window.onunload = check;
function check(){
alert("hey");
return false;
}
当我尝试重新加载浏览器时,这里会生成警报。但return false;
不工作。
或者如果有可能没有Navigation bar
在新弹出的窗口中。
所以请帮忙