Retrieves the bottom coordinate of the rectangle surrounding the object content.
Syntax
HTML N/A Scripting [ iCoord = ] oTextRectangle.bottom
Possible Values
iCoord Integer that specifies the bottom coordinate of the rectangle, in pixels. The property is read-only with no default value.
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;
Example
This example uses the getBoundingClientRect method to retrieve the coordinates of the bounds of the text rectangles within the element.
Sample Code
<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)">
Applies To
TextRectangle
See Also
left, right, top, TextRectangle Collection, TextRectangle Object