JavaScript Reference/Javascript Properties/uniqueID
"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> || | |
| |<dir>| | |<col> <colgroup> | | |<comment>
| | | || | |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>
| | |<textarea> <tfoot> |
| |<thead> | | |<title> | | | | | | | | |<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>