Click to return to the Reusing Browser Technology home page    
IHTMLBlockElement::get_cl...     IHTMLBodyElement::createT...     Interfaces and Scripting ...    
Web Workshop  |  Reusing Browser Technology

IHTMLBodyElement Interface


This interface provides access to the BODY element, and specifies the beginning and end of the document body.

IHTMLBodyElement Methods

createTextRange Creates a TextRange object for the BODY element. You use a text range to examine and modify the text within the element.
get_aLink Retrieves the color used for the active link.
get_background Retrieves the URL of the background picture, if any. The picture is tiled behind the text and graphics on the page.
get_bgColor Retrieves the background color of the page.
get_bgProperties Retrieves the properties for the background picture.
get_bottomMargin Retrieves the margin, in pixels, for the bottom of the page and overrides the default margin.
get_leftMargin Retrieves the left margin, in pixels, for the entire body of the page and overrides the default margin.
get_link Retrieves the color used for links that have not yet been visited.
get_noWrap Retrieves the value that indicates whether automatic wordwrapping is enabled or disabled for the document.
get_onbeforeunload Retrieves a pointer to the event handler function associated with the onbeforeunload event on the BODY element.
get_onload Retrieves a pointer to the event handler function associated with the onload event on the BODY element.
get_onselect Retrieves a pointer to the event handler function associated with the onselect event on the BODY element.
get_onunload Retrieves a pointer to the event handler function associated with the onunload event on the BODY element.
get_rightMargin Retrieves the right margin, in pixels, for the entire body of the page and overrides the default margin.
get_scroll Retrieves the value that indicates whether the scroll bars are turned on or off.
get_text Retrieves the current text (foreground) color of the document body.
get_topMargin Retrieves the margin, in pixels, for the top of the page and overrides the default margin.
get_vLink Retrieves the color used for links that have been visited.
put_aLink Sets the color for the active link.
put_background Sets the URL of the background picture, if any. The picture is tiled behind the text and graphics on the page.
put_bgColor Sets the background color of the page.
put_bgProperties Sets the properties for the background picture.
put_bottomMargin Sets the margin, in pixels, for the bottom of the page and overrides the default margin.
put_leftMargin Sets the left margin, in pixels, for the entire body of the page and overrides the default margin.
put_link Sets the color of links that have not yet been visited.
put_noWrap Sets the value that indicates whether automatic wordwrapping is enabled or disabled for the document.
put_onbeforeunload Sets a pointer to the event handler function associated with the onbeforeunload event on the BODY element.
put_onload Sets a pointer to the event handler function associated with the onload event on the BODY element.
put_onselect Sets a pointer to the event handler function associated with the onselect event on the BODY element.
put_onunload Sets a pointer to the event handler function associated with the onunload event on the BODY element.
put_rightMargin Sets the right margin, in pixels, for the entire body of the page and overrides the default margin.
put_scroll Sets the value that indicates whether the scroll bars are turned on or off.
put_text Sets the current text (foreground) color for the document body.
put_topMargin Sets the margin, in pixels, for the top of the page and overrides the default margin.
put_vLink Sets the color of links that have been visited.

Interface Information

Implementation System (Mshtml.dll)
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

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

Remarks

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

Use the IHTMLDocument2::get_body method to retrieve a pointer to the IHTMLBodyElement interface for a document's BODY element.

The BODY element is a block element.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.