no, to catch 捕捉關閉事件, try<script language=javascript>
function window.onunload()
{
  if (event.clientX < 0 && event.clientY < 0)
  {
          //window will be closed, do something here
  }
}
</script>but you cannot cancel the closing, if you want to give the user a warning, use onbeforeunload, see
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events/onbeforeunload.aspbut it is also triggered when the page is being reloaded