兼容IE、火狐、谷歌的页面关闭事件
2015-02-10 14:57 NO.27 阅读(432) 评论(0) 编辑 收藏 举报<html> <head> <script language="javascript"> var blnCheckUnload = true; window.onbeforeunload = function() { if(blnCheckUnload) { return("Are You Sure?"); } } </script> <body> </body> </html>
重点是那个reuturn!
转自:http://blog.sina.com.cn/s/blog_4cb400450100iidu.html
感谢!