1.
//由test.htm打开onbeforeunload.htm
//当关闭onbeforeunload.htm时,刷新test.htm窗口.test.htm<script>
alert("0");
</script>
<input type=button
onclick="window.open('onbeforeunload.htm',null,'')" 
value="open">onbeforeunload.htm<BODY onbeforeunload="opener.location.reload();">
reload parent windows
</BODY>2.
好像不行,不过,你可以通过判断是否取得焦点
<body onblur="alert('OK!?')">3.
不能实现..