JavaScript Reference/Javascript Properties/tabIndex

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

"tabIndex" Example

   <source lang="javascript">
   

<html> <body> <input type="text" value="Tab 1" tabindex="0"</input> <input id="myText" type="text" value="Tab 2" tabindex="1"</input> <button onclick="alert(myText.tabIndex);">Tab Index of second text box</button> </body> </html>


     </source>
   
  


"tabIndex" is applied to

   <source lang="javascript">

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

| |
<body> |

| |<button> |

| |
|

| |<custom>

| | | |

| |<dir>
| | |
| | | <fieldset> | | | <form> | | |<frame> <frameset> | | |<hn>
|

| | <iframe> | | |<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>
  • | | |<listing> <marquee> | | |<menu> <object> | | |

      | | |<plaintext>

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

        "tabIndex" Syntax and Note

        <source lang="javascript"> Note: Read and write property. Sets the element"s tab order.

        Syntax:

        document.getElementById("elementID").tabIndex = value document.all.elementID.tabIndex = value // IE only


        </source>

      <textarea> | | |<tfoot> | | |<thead>