3. Global event attributes (supported after HTML4, mainly used for scripts run after the browser triggers the event, the values are all script):
1. Window event attributes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
onafterprint 打印文档后运行脚本;
onbeforeprint 打印文档前;
onbeforeonload 文档加载前;
onload 文档加载时;
onoffline 文档离线时;
ononline 文档上线时;
onhaschange 文档改变时;
onredo 文档再次执行时;
onundo 文档执行撤销时;
onerror 出现错误时;
onmessage 触发消息时;
onunload 用户离开文档时;
onblur 窗口失去焦点时;
onfocus 窗口获得焦点时;
onpagehide 窗口隐藏时;
onpageshow 窗口可见时;
onpopstate 窗口历史记录改变时;
onresize 窗口大小改变时;
onstorage web storage区域更新时;
Copy after login
Believe it or not After reading the case in this article, you have mastered the method. For more exciting information, please pay attention to other related articles on the PHP Chinese website!
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn