How to introduce body in HTML5
It is believed that many inexperienced people have no idea about how to introduce body in HTML5. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
The body element is the main content tag of the html document.
Properties can be set
Onafterprint runs the script after printing the document
Onbeforeprint runs the script before the document is printed
Onbeforeonload runs the script before the document loads
Onblur runs the script when the window loses focus
Onerror runs the script when an error occurs
Onfocus runs the script when the window gets focus
Onhaschange runs the script when the document changes
Onload runs scripts when the document is loaded
Onmessage runs a script when a message is triggered
Onoffline runs scripts when the document is offline
Ononline runs scripts when the document is online
Onpagehide runs the script when the window is hidden
Onpageshow runs the script when the window is visible
Onpopstate runs the script when the window history changes
Onredo runs the script when the document performs a redo
Onresize runs the script when resizing the window
Onstorage runs the script when the document loads
Onundo runs the script when the document performs an undo operation
Onunload runs the script when the user leaves the document
DOM interface
Code: select all to run
Interface HTMLBodyElement: HTMLElement {attribute Function onafterprint; attribute Function onbeforeprint; attribute Function onbeforeunload; attribute Function onblur; attribute Function onerror; attribute Function onfocus; attribute Function onhashchange; attribute Function onload; attribute Function onmessage; attribute Function onoffline; attribute Function ononline; attribute Function onpopstate; attribute Function onpagehide; attribute Function onpageshow; attribute Function onredo; attribute Function onresize; attribute Function onscroll; attribute Function onstorage; attribute Function onundo; attribute Function onunload;}; after reading the above, have you mastered the method of introducing body in HTML5? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!