IHTMLBodyElement Interface

来源:互联网 发布:阿里云全球份额 编辑:程序博客网 时间:2024/05/29 02:30

 

 

IHTMLBodyElement Interface
这个接口很重要

Provides access to the body element, and specifies the beginning and the end of the document body.

IHTMLBodyElement Members

aLinkSets or gets the color of all active links in the element.backgroundSets or retrieves the background picture tiled behind the text and graphics on the page. bgColorDeprecated. Sets or retrieves the background color behind the object. bgPropertiesSets or gets the properties of the background picture. bottomMarginSets or gets the bottom margin of the entire body of the page.createTextRangeCreates a TextRange object for the element.leftMarginSets or gets the left margin for the entire body of the page, which overrides the default margin. linkSets or gets the color of the document links for the object. noWrapSets or retrieves whether the browser automatically performs wordwrap.onbeforeunloadSets or retrieves a pointer to the event handler function associated with the onbeforeunload event.onloadSets or retrieves a pointer to the event handler function associated with the onload event. The onload event occurs immediately after the browser loads the object.onselectSets or retrieves a pointer to the event handler function associated with the onselect event. An onselect event occurs at the beginning of a user-initiated select. This event can be canceled, and it participates in the bubbling model.onunloadSets or retrieves a pointer to the event handler function associated with the onunload event.rightMarginSets or gets the right margin for the entire body of the page. scrollSets or gets a value that indicates whether the scroll bars are turned on or off.textSets or gets the text (foreground) color for the document body. topMarginSets or gets the margin for the top of the page.vLinkSets or gets the color of links in the object that have already been visited.

Remarks

The methods that act on the IHTMLBodyElement interface enable you to control the behavior and characteristics of the body element.

Use the IHTMLDocument2::body method to get a pointer to the IHTMLBodyElement interface for a body element of the document.

The body element is a block element.

Interface Information

Stock Implementationmshtml.dllCustom ImplementationNoInherits fromIDispatchHeader and IDL filesMshtml.h, Mshtml.idlMinimum availabilityInternet Explorer 4.0Minimum operating systemsWindows 95, Windows NT 4.0, Windows CE 2.12

 

 

IHTMLBodyElement2 Interface

只有两个成员:

onafterprint

Sets or retrieves a pointer to the event handler function that is called when the onafterprint event is fired.
o
nbeforeprint

Sets or retrieves a pointer to the event handler function that is called when the onbeforeprint event is fired.

 

 

IHTMLBodyElement3 Members

backgroundSets or retrieves the background picture tiled behind the text and graphics on the page. onhashchangeSets or retrieves a pointer to the event handler function associated with the onhashchange event. onofflineSets or retrieves a pointer to the event handler function associated with the onoffline event. ononlineSets or retrieves a pointer to the event handler function associated with the ononline event.