HTML5 defines and defines various labels: body Introduction

Source: Internet
Author: User

Comments: This article mainly introduces the body Tag body element, which is the main content tag of the html document.
Configurable attributes
Onafterprint run the script after printing the document
Onbeforeprint run the script before the document is printed
Onbeforeonload run the script before the file is loaded
Onblur runs scripts when the window loses focus
Onerror: run the script when an error occurs.
Onfocus run the script when the window gets the focus
Onhaschange run the script when the document changes
Onload: run the script when the document is loaded
Onmessage
Onoffline run scripts when documents are offline
Ononline
Onpagehide runs scripts when the window is hidden
Onpageshow run the script when the window is visible
Onpopstate: run the script when the window history changes
Onredo: run the script when the document executes the redo operation.
Onresize run the script when the window size is adjusted
Onstorage
Onundo: run the script when the document executes the Undo operation.
Onunload run 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;
};

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.