HTML 捕获window.close() 并做窗口关闭前的处理工作
2020-11-27 05:25
标签:style blog class code java c 转自:http://www.xinotes.net/notes/note/261/ 学习一下~!~ HTML 捕获window.close() 并做窗口关闭前的处理工作,搜素材,soscw.com HTML 捕获window.close() 并做窗口关闭前的处理工作 标签:style blog class code java c 原文地址:http://www.cnblogs.com/tx8899/p/3729803.html 1 html>
2 head>
3 script language="JavaScript">
4 function beforeunload(ev) {
5 var event = ev || window.event;
6 event.returnValue = "Are you sure you want to close this window? "
7 + "All of your work will be lost if you close";
8 }
9 script>
10 head>
11 body onbeforeunload="beforeunload(event);">
12 Try close this window.
13 body>html>
文章标题:HTML 捕获window.close() 并做窗口关闭前的处理工作
文章链接:http://soscw.com/essay/22813.html