Posted in Javascript onJuly 08, 2013
<script type="text/javascript"> window.onbeforeunload = onbeforeunload_handler; window.onunload = onunload_handler; function onbeforeunload_handler(){ var warning="确认退出?"; return warning; //可以换成alert等具体操作 } function onunload_handler(){ var warning="谢谢光临"; alert(warning); //关闭后执行 } </script>
解析javascript 浏览器关闭事件
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@