JavaScript Reference/Javascript Properties/sourceIndex
"sourceIndex" Example
<source lang="javascript">
<html> <body> <button onclick="alert(this.sourceIndex)">Source Index</button> </body> </html>
</source>
"sourceIndex" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | |<base> <basefont> | | | <bgsound> |
| ||| |<body>
| | |<button>| | | | | |
| |<dir><col> | | |<colgroup> <comment> | | |<custom>
| | | || | |
- | | | <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>- | | |<link> <listing> | | |<map> <marquee> | | |<menu> <nobr> | | |<object>
| | |
| | || | | <script> | | |<select> | | || | | | | || | |<tbody>
| | |<textarea> <tfoot> |
| |<thead> | | |<title> | | | | | | | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>
"sourceIndex" Syntax and Note
<source lang="javascript"> Note: Read-only property. Returns the element position in all collection.
Syntax:
document.all.elementID.sourceIndex
</source>