JavaScript Reference/Javascript Methods/getClientRects

Материал из Web эксперт
Перейти к: навигация, поиск

"getClientRects()" Example

   <source lang="javascript">
   

<html> <body> <button onclick="alert(this.getClientRects().length);">ClientRect</button> </body> </html>


     </source>
   
  


"getClientRects()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | |<base> <basefont> |

| |
|

| |<body> <button> |

| |
|

| | | | |<col> <colgroup> | | |<comment> <custom> | | |

| | | <dir> |

| |
|

| |

| | |<embed> <fieldset> | | | <form> | | |<hn> | | |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<input type="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | <isindex> | | | <label> |

| |<legend>
  • | | |<link> <listing> | | |<map> <marquee> | | |<menu> <nobr> | | |<object>
      | | |<option>

      | | |

                                                            |
      |                |                                                     |
      |                |<select>                                               |
      |                |                                                |
      |                |                                                 |
      |                |                                                  |
      |                |<tbody>                                                   |
      |                |                                                       |
      |                |
        | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>

        "getClientRects()" Syntax, Parameters and Note

        <source lang="javascript"> Note: Returns a TextRectangle object for the element"s boundaries.

        Syntax:

        textRangeName.getClientRects() document.all.elementID.getClientRects()


        </source>

      |

      | |<textarea> TextRange |

      | |<tfoot>
      | | |<thead>