<script for=window event=onbeforeunload> 
if (event.clientX>document.body.clientWidth &&event.clientY<0||event.altKey) 
return("请先保存再关闭?") 
</script>