boundingHeight property
Retrieves the height of the rectangle that bounds the TextRange object.
Syntax
| JavaScript | |
|---|
Property values
Type: Integer
the height of the bounding rectangle, in pixels.
Examples
This example retrieves the value of the boundingHeight property for the given text area.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/boundingTop.htm
<!DOCTYPE html> <html> <head> <title>boundingHeight</title> </head> <body> <textarea cols="100" rows="2" onclick="boundDim(this)"> . . . </textarea> <script> function boundDim(oObject) { var oTextRange = oObject.createTextRange(); if (oTextRange != null) { console.log("The bounding height is " + oTextRange.boundingHeight); } } </script> </body> </html>
See also
- TextRange
- Reference
- boundingLeft
- boundingTop
- boundingWidth
Show: