Partager via


IHTMLBodyElement interface

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

Members

The IHTMLBodyElement interface inherits from the IDispatch interface. IHTMLBodyElement also has these types of members:

  • Methods
  • Properties

Methods

The IHTMLBodyElement interface has these methods.

Method Description
createTextRange

Creates a TextRange object for the element.

 

Properties

The IHTMLBodyElement interface has these properties.

Property Description

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 document.

leftMargin

Sets or gets the left margin for the entire body of the document, 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.

onload

Sets or retrieves a pointer to the event handler function associated with the HTMLFrameSiteEvents::onload event. The HTMLFrameSiteEvents::onload event occurs immediately after the browser loads the object.

rightMargin

Sets or gets the right margin for the entire body of the document.

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 document.

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.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch