关闭页面时,弹出窗口。只ie。
/****** popup a window while closing*****/
window.onbeforeunload = function (){
openWin("b.html","",520,380);
//alert("close");
if (event.clientX < document.body.clientWidth && event.clientY<0 ||event.altKey){
//alert("close.........");
}else{
//alert("flush");
}
}
/***** open window *****/
function openWin(url,title,width,height){
//titlebar=0,toolbar=0,menubar=0
window.open(url,title,"width="+width+",height="+height+",top=200,left=350");
}
本文详细介绍了在IE浏览器中实现关闭页面时弹出特定窗口的代码逻辑及应用,包括窗口打开与关闭条件的判断。
1536

被折叠的 条评论
为什么被折叠?



