免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
body HTML元素

定義

指明文檔主體的開始和結(jié)束。

Specifies the beginning and end of the document body.

注釋

在 Internet Explorer 6 中,如果你使用 !DOCTYPE 聲明指定為標(biāo)準(zhǔn)兼容模式,body 對(duì)象可以從其內(nèi)容獲取其大小,或者你可以像 div 對(duì)象那樣嚴(yán)格設(shè)置其大小。在標(biāo)準(zhǔn)兼容模式下,html 元素會(huì)代表文檔可顯示內(nèi)容的整個(gè)外觀。如果 !DOCTYPE 聲明并不指定標(biāo)準(zhǔn)兼容模式,以及較早版本的 Internet Explorer,則是 body 對(duì)象代表文檔可顯示內(nèi)容的整個(gè)外觀。body 對(duì)象的大小無(wú)法更改,它等于窗口的大小。你在此對(duì)象上設(shè)置的邊距位于此對(duì)象的邊框和滾動(dòng)條之內(nèi)。

你可以在腳本中通過(guò) document 對(duì)象來(lái)訪問(wèn) body 元素。

元素 body 的 window 對(duì)象可以處理 onblur, onfocus, onload, 或 onunload 事件。

此元素在 Internet Explorer 3.0 及以上版本的 HTML 中可用,在 Internet Explorer 4.0 及以上版本的腳本中可用。

此元素是塊元素。

此元素需要關(guān)閉標(biāo)簽。

As of Internet Explorer 6, when you use the !DOCTYPE declaration to specify standards-compliant mode, the body object can obtain its size from its content, or you can set its size explicitly—like a div object, for example. In standards-compliant mode, the html element represents the entire surface onto which a document‘s contents can be rendered. When the !DOCTYPE declaration does not specify standards-compliant mode, and with earler versions of Internet Explorer, the body object represents the entire surface onto which a document‘s contents can be rendered. The size of the body object cannot be changed and is equal to the size of the window. Margins you set on this object are rendered inside the border and scrollbars of the object.

You can access the body element from script through the document object.

The window object for the body element can host event handlers for the onblur, onfocus, onload, or onunload events.

This element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

This element is a block element.

This element requires a closing tag.

示例代碼

演示示例:一個(gè)非常簡(jiǎn)單的HTML文件

下面的例子在腳本中引用了 body 元素。

This example exposes the body element in script.

var oBody = document.body;
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
.htc文件
xxe漏洞原理與防御
XML 驗(yàn)證
[Web安全] XXE漏洞攻防學(xué)習(xí)(上)
XML文件格式語(yǔ)法及DTD
開發(fā)者必須知道的HTML5十五大新特性
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服