有关卸载事件
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>卸载事件</title> <script type = "text/JavaScript"> window.open("http://www.imooc.com","_self"); window.onunload = onunload_message; function onunload_message(){ confirm("你确定要离开此网页么?"); } </script> </head> <body> </body> </html>
打开网页(慕课网)后刷新怎么不会执行卸载事件呢?问题在哪儿?怎么解决啊?谢谢大家了