JavaScript Reference/Javascript Properties/uniqueID

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

"uniqueID" Example

   <source lang="javascript">
   

<html> <body> <button onclick="alert(this.uniqueID);">Unique ID</button> </body> </html>


     </source>
   
  


"uniqueID" is applied to

   <source lang="javascript">

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

| |
<body> |

| |
<button> |

| |
|

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

| | | |

| |<dir>
| | |
document | | |
| | |<embed> <fieldset> | | | <form> | | |<frame> <frameset> | | |<head> <hn> | | |
<html> |

| | <iframe> | | |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<input type="hidden"> <input type="image"> | | |<input type="password"> <input type="radio"> | | |<input type="reset"> <input type="submit"> | | |<input type="text"> | | | <label> |

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

      | | |<plaintext>

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

        "uniqueID" Syntax and Note

        <source lang="javascript"> Note: Read-only property. Returns the element unique ID in the page.

        Syntax:

        document.all.elementID.uniqueID


        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |<title>