您好,欢迎访问一九零五行业门户网

在HTML中,当页面卸载时执行脚本?

unloaded 属性在网页卸载时触发。您可以尝试运行以下代码来实现 html 中的 unloaded 属性 -
示例<!doctype html><html> <body onunload = "display()"> <h2>tutorialspoint</h2> <h3>simply easy learning</h3> <script> function display() { alert("bye!"); } </script> </body></html>
以上就是在html中,当页面卸载时执行脚本?的详细内容。
其它类似信息

推荐信息