1、<script language="Javascript">
window.onbeforeunload = function()
{
if(((event.clientX > document.body.clientWidth - 43) && (event.clIEntY < 23)) || event.altKey) {
window.event.returnValue = "關閉網頁"'';
}
}
</script>
2、<script language="Javascript">
window.onbeforeunload = function()
{
var n = window.event.screenX - window.screenLeft;
var b = n > document.documentElement.scrollWidth-20;
if(b && window.event.clIEntY < 0 || window.event.altKey)
{
alert("是關閉而非刷新");
window.open(this.location);
//return false;
//window.event.returnValue = ""; }
}
</script>