首頁 >web前端 >H5教程 >HTML5 對各個標籤的定義與規定:body的介紹_html5教學技巧

HTML5 對各個標籤的定義與規定:body的介紹_html5教學技巧

PHP中文网
PHP中文网原創
2016-05-16 15:51:151868瀏覽

本文主要介紹body標籤 body元素就是是html文檔的主內容標籤。
可設定屬性
onafterprint 在列印文件之後執行腳本
onbeforeprint 在文件列印之前執行腳本
onbeforeonload 在文件載入之前執行腳本
onblur 當視窗失去焦點時執行腳本
onerror 當錯誤發生時執行腳本
onfocus 當視窗獲得焦點時執行腳本
onhaschange 當文件改變時執行腳本
onload 當文件載入時執行腳本
onmessage 當觸發訊息時執行腳本
onoffline 當文件離線時執行腳本
ononline 當文件上線時執行腳本
onpagehide 當視窗隱藏時執行腳本
onpageshow 當視窗可見時執行腳本
onpopstate 當視窗歷史記錄改變時執行腳本
onredo 當文件執行再執行操作(redo)時執行腳本
onresize 當調整視窗大小時執行腳本
onstorage 當文件載入載入時執行腳本
onundo 當文件執行撤銷操作時執行腳本
onunload 當使用者離開文件時執行腳本
DOM 介面
interface HTMLBodyElement : HTMLElement {
attribute Function onafterprint;
attribute Function onbeforeprint; onblur;
attribute Function onerror;
attribute Function onfocus;
attribute Function onhashchange;
attribute Function onload; ute Function ononline ;
attribute Function onpopstate;
attribute Function onpagehide;
attribute Function onpageshow;
attribute Function onredo; attribute Function onundo;
attribute Function onunload;
};

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn