http://www.mastersfunds.com.php5-23.dfw1-2.websitetestlink.com/how-to-invest
当我将光标放在 FIRST NAME 字段中并按键盘上的 TAB 键时,在该表单中可以看到,光标转到右侧的下拉列表而不是 LAST NAME
当用户使用我键盘上的 TAB 键时,如何指定字段的顺序?
最佳答案
在输入中指定tabindex
例如
<html>
<head>
<title>Controlling TAB Order</title>
</head>
<body>
<form>
Field 1 (first tab selection):
<input type="text" name="field1" tabindex="1" /><br />
Field 2 (third tab selection):
<input type="text" name="field2" tabindex="3" /><br />
Field 3 (second tab selection):
<input type="text" name="field3" tabindex="2" /><br />
</form>
</body>
</html>
编辑:同意评论,添加引号。
关于php - HTML 表单中的 TAB 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7236946/