溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

HTML5的body屬性怎么設(shè)置

發(fā)布時間:2022-03-09 10:47:38 來源:億速云 閱讀:592 作者:iii 欄目:web開發(fā)

本文小編為大家詳細介紹“HTML5的body屬性怎么設(shè)置”,內(nèi)容詳細,步驟清晰,細節(jié)處理妥當(dāng),希望這篇“HTML5的body屬性怎么設(shè)置”文章能幫助大家解決疑惑,下面跟著小編的思路慢慢深入,一起來學(xué)習(xí)新知識吧。

body元素就是就是html文檔的主內(nèi)容標簽。

可設(shè)置屬性

onafterprint 在打印文檔之后運行腳本

onbeforeprint 在文檔打印之前運行腳本

onbeforeonload 在文檔加載之前運行腳本

onblur 當(dāng)窗口失去焦點時運行腳本

onerror 當(dāng)錯誤發(fā)生時運行腳本

onfocus 當(dāng)窗口獲得焦點時運行腳本

onhaschange 當(dāng)文檔改變時運行腳本

onload 當(dāng)文檔加載時運行腳本

onmessage 當(dāng)觸發(fā)消息時運行腳本

onoffline 當(dāng)文檔離線時運行腳本

ononline 當(dāng)文檔上線時運行腳本

onpagehide 當(dāng)窗口隱藏時運行腳本

onpageshow 當(dāng)窗口可見時運行腳本

onpopstate 當(dāng)窗口歷史記錄改變時運行腳本

onredo 當(dāng)文檔執(zhí)行再執(zhí)行操作(redo)時運行腳本

onresize 當(dāng)調(diào)整窗口大小時運行腳本

onstorage 當(dāng)文檔加載加載時運行腳本

onundo 當(dāng)文檔執(zhí)行撤銷操作時運行腳本

onunload 當(dāng)用戶離開文檔時運行腳本

DOM 接口

代碼: 全選 運行

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;

};

讀到這里,這篇“HTML5的body屬性怎么設(shè)置”文章已經(jīng)介紹完畢,想要掌握這篇文章的知識點還需要大家自己動手實踐使用過才能領(lǐng)會,如果想了解更多相關(guān)內(nèi)容的文章,歡迎關(guān)注億速云行業(yè)資訊頻道。

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI