onunload 事件在用户退出页面时发生。
... onload //装载完成后触发 onunload //退出时触发 onbeforeunload //退出时触发, 会发作在 onunload 之前, 假如还想后头应该用这个 ..
基于30个网页-相关网页
onunload script 当用户离开文档时运行脚本
The onunload event occurs when the user leaves the page.
onunload事件在用户离开页面时发生。
For example, the tag has the onload and onunload attributes.
例如,标记拥有onload和onunload属性。
Keep in mind that the HTML 4.0-style attribute syntax, used for onunload in Listing 1, registers observers for the bubbling phase.
要记住,对于清单1中onunload所用的HTML 4.0风格的语法,观测者被注册到冒泡阶段。
应用推荐