特写出代码来让各位看一下.
window.onbeforeunload = function popup(){
window.open('popup.htm','','width=464,height=181');
window.opener="";
window.close();
}
window.onbeforeunload = function popup(){
window.open('popup.htm','','width=464,height=181');
window.opener="";
window.close();
}
window.onbeforeunload = function()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
pop();
}
}
</script>
window.onbeforeunload = function()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
window.open('popup.htm','','width=464,height=181');
}
}
</script>
<script>
window.onbeforeunload = function popup(){
window.open('popup.html','','width=464,height=181');
window.opener="";
window.close();
}
</script>
因为你点超连接会重新装载当前页啊
可以考虑onexit之类的事件。从理论上说,关闭窗口是浏览器的事件,网页的创作者不应该关心这个东西。web和application是不一样的,不必也不应该事事操心。