HBCMS更多的中文手册参考:

bottom参数属性

DHTML文档教程

Set or retrieves the bottom coordinate of the rectangle surrounding the object content.

dhtml语法

TextRectangle.bottom [ = iCoord ]

DHTML可能的值

iCoordInteger that specifies or receives the bottom coordinate of the rectangle, in pixels.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.

remarks

this syntax shows how to access the bottom coordinate of the second text rectangle of a textrange object.

oRct = oTextRange.getClientRects();
oRct[1].bottom;

Note that the collection index starts at 0, so the second item index is 1.

This syntax shows how to access the bottom coordinate of the bounding rectangle of an element object.

oBndRct = oElement.getBoundingClientRect();
oBndRct.bottom;

DHTML代码范例

This example uses the getboundingclientrect method to retrieve the coordinates of the bounds of the text rectangles within the element.

<SCRIPT>
function getCoords(oObject) {
oBndRct=oObject.getBoundingClientRect();
alert("Bounding rectangle = \nUpper left coordinates: "
+ oBndRct.left + " " + oBndRct.top +
"\nLower right coordinates: "
+ oBndRct.right + " " + oBndRct.bottom);
}
</SCRIPT>
</HEAD>
<BODY>
<P ID=oPara onclick="getCoords(this)">
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准

This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) Non-Microsoft link.

Applies To

TextRectangle

更多语法参考

left, right, top, textrectangle, TextRectangle Collection