HTML DOM rows 属性

定义和用法

tabIndex 属性设置或返回 textarea 的 tab 键控制次序。

语法

  1. textareaObject.tabIndex=number

实例

本例输出不同表单域的 tab 键控制次序:

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function checkTab(x)
  5. {
  6. alert(x.tabIndex)
  7. }
  8. </script>
  9. </head>
  10. <body>
  11.  
  12. <form>
  13. <textarea id="txt1" tabindex="1" onclick="checkTab(this)">
  14. Hello world....This is a text area
  15. </textarea>
  16. <input id="txt2" type="text" tabindex="2" onclick="checkTab(this)">
  17. <input id="txt3" type="text" tabindex="3" onclick="checkTab(this)">
  18. </form>
  19.  
  20. </body>
  21. </html>