window.onbeforeunload = function(event){
var n = window.event.screenX - window.screenLeft;
var b = n > document.documentElement.scrollWidth-20;
if(b && window.event.clientY < 0 || window.event.altKey)
{
window.event.returnValue = "我要离开";
}else{
//window.event.returnValue = "";
}
}
请问各位高手 怎么可要获取 window.event.returnValue = "我要离开"; 选择后的返回值
var n = window.event.screenX - window.screenLeft;
var b = n > document.documentElement.scrollWidth-20;
if(b && window.event.clientY < 0 || window.event.altKey)
{
window.event.returnValue = "我要离开";
}else{
//window.event.returnValue = "";
}
}
请问各位高手 怎么可要获取 window.event.returnValue = "我要离开"; 选择后的返回值
var retvalue = showModalDialog(子窗口)
{
return '';
}
window.onunload = function()
{
//如果选择停留, 将看不到这个提示
alert('即将离开本页面');
}
如何判断我点击的是“确定”还是“取消”呢
{
return '';
}
window.onunload = function()
{
//如果选择停留, 将看不到这个提示
alert('即将离开本页面');
}
判断下一个触发事件是否执行,若执行则点的是“确定”,反之“取消”