<script language=javascript>
function window.onbeforeunload()
{
if ((event.clientX>document.body.clientWidth) && (event.clientY<0||event.altKey))
    {   
       alert("关闭");
}
}
//--
</script>