Package | cssom.view |
Interface | public interface TextRectangleList |
Introduced in: | DOM 0 |
See also
Property | Defined By | ||
---|---|---|---|
CSSOM View length : Number [read-only]
Returns the total number of TextRectangle objects associated with the object. | TextRectangleList |
Method | Defined By | ||
---|---|---|---|
Retrieves an object from a TextRectangle collection. | TextRectangleList | ||
Retrieves an object or a collection from a specified collection. | TextRectangleList |
CSSOM View length | property |
length:Number
[read-only] Product Versions : | 5.5 6.0 7.0 8.0 as IE7 8.0 as IE8 2.0 3.0 3.1b 3.0 3.1 4.0b 1.0 2.0 9.62 10.0a |
Introduced in: | DOM 0 |
Returns the total number of TextRectangle objects associated with the object.
public function get length():Number
See also
CSSOM View item | () | method |
public function item(index:Number):TextRectangle
Product Versions : | 5.5 6.0 7.0 8.0 as IE7 8.0 as IE8 2.0 3.0 3.1b 3.0 3.1 4.0b 1.0 2.0 9.62 10.0a |
Introduced in: | DOM 0 |
Retrieves an object from a TextRectangle collection.
Parameters
index:Number |
TextRectangle — The TextRectangle object at that index
|
DOMException — INDEX_SIZE_ERR: May be raised if the index
is negative or greater than the number of TextRectangle objects
associated with the object.
|
See also
namedItem | () | method |
public function namedItem(name:DOMString):TextRectangle
Product Versions : | 5.5 6.0 7.0 8.0 as IE7 8.0 as IE8 2.0 3.0 3.1b 3.0 3.1 4.0b 1.0 2.0 9.62 10.0a |
Non-standard (Microsoft)
Retrieves an object or a collection from a specified collection.
Note (IE8): In IE8 mode, the namedItem method does not return collections if more than one named item is found; instead, it returns the first case-insensitive matched element.
Parameters
name:DOMString — The name or id property of the object to retrieve. A collection is returned if more than one match is made.
|
TextRectangle — Returns an object or a collection of objects if successful, or null otherwise.
|
See also
<div id="oDIV1">This text will not change.</div> <div id="oDIV2">This text will change.</div> <button onclick="document.all.namedItem('oDIV2').innerHTML='Changed!';"> Change Option </button>
<script> function newHighlite(obj) { oRcts = obj.getClientRects(); iLength = oRcts.length; for (i = 0;i < iLength; i++) { alert("Line number " + (i + 1) + " is " + (oRcts(i).right - oRcts(i).left) + " pixels wide."); } } </script>