关闭页面时,弹出窗口。只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");
}