HTML DOM rows 属性
定义和用法
tabIndex 属性设置或返回 textarea 的 tab 键控制次序。
语法
- textareaObject.tabIndex=number
实例
本例输出不同表单域的 tab 键控制次序:
- <html>
- <head>
- <script type="text/javascript">
- function checkTab(x)
- {
- alert(
x.tabIndex
)- }
- </script>
- </head>
- <body>
- <form>
- <textarea id="txt1" tabindex="1" onclick="checkTab(this)">
- Hello world....This is a text area
- </textarea>
- <input id="txt2" type="text" tabindex="2" onclick="checkTab(this)">
- <input id="txt3" type="text" tabindex="3" onclick="checkTab(this)">
- </form>
- </body>
- </html>