TextRange Properties DHTML Object Properties
Retrieves the width of the rectangle that bounds the TextRange.
HTML |
N/A |
Script |
[ iWidth = ] TextRange.boundingWidth |
iWidth |
Integer specifying the width of the bounding rectangle. |
The property is read-only with no default value.
The following example retrieves the value of the boundingWidth property for the given text area.
<script language="JavaScript">
function boundDim ( oObject ) {
var collTextarea = document.all.tags ( "TEXTAREA" );
if ( collTextarea != null ) {
var oTextRange = oObject.createTextRange ( );
if ( oTextRange != null ) {
alert ( "The bounding width is \n" +
oTextRange.boundingWidth );
}
}
}
</script>
</head>
<body>
<TEXTAREA COLS=100 ROWS=2 id=oTextarea
onclick="boundDim ( this )"> . . . </TEXTAREA>
This feature requires Microsoft® Internet Explorer® 4.01 or later.
Show me
TextRange