Provides access to the body element, and specifies the beginning and the end of the document body.
IHTMLBodyElement Members
aLink Sets or gets the color of all active links in the element. background Sets or retrieves the background picture tiled behind the text and graphics on the page. bgColor Deprecated. Sets or retrieves the background color behind the object. bgProperties Sets or gets the properties of the background picture. bottomMargin Sets or gets the bottom margin of the entire body of the page. createTextRange Creates a TextRange object for the element. leftMargin Sets or gets the left margin for the entire body of the page, which overrides the default margin. link Sets or gets the color of the document links for the object. noWrap Sets or retrieves whether the browser automatically performs wordwrap. onbeforeunload Sets or retrieves a pointer to the event handler function associated with the onbeforeunload event. onload Sets 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. onselect Sets 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. onunload Sets or retrieves a pointer to the event handler function associated with the onunload event. rightMargin Sets or gets the right margin for the entire body of the page. scroll Sets or gets a value that indicates whether the scroll bars are turned on or off. text Sets or gets the text (foreground) color for the document body. topMargin Sets or gets the margin for the top of the page. vLink Sets 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 Implementation mshtml.dll Custom Implementation No Inherits from IDispatch Header and IDL files Mshtml.h, Mshtml.idl Minimum availability Internet Explorer 4.0 Minimum operating systems Windows 95, Windows NT 4.0, Windows CE 2.12
IHTMLBodyElement2 Interface
只有两个成员:
Sets or retrieves a pointer to the event handler function that is called when the onafterprint event is fired.
onbeforeprint
Sets or retrieves a pointer to the event handler function that is called when the onbeforeprint event is fired.
IHTMLBodyElement3 Members
background Sets or retrieves the background picture tiled behind the text and graphics on the page. onhashchange Sets or retrieves a pointer to the event handler function associated with the onhashchange event. onoffline Sets or retrieves a pointer to the event handler function associated with the onoffline event. ononline Sets or retrieves a pointer to the event handler function associated with the ononline event.