案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function changeTabIndex()
5
{
6
document.getElementById('check3').tabIndex="1"
7
document.getElementById('check1').tabIndex="3"
8
}
9
</script>
10
</head>
11
12
<body>
13
<p>Try navigating the links on this page by
14
using your "tab" button on you keyboard</p>
15
16
<form><input type="checkbox" id="check1" tabIndex="1" /><br />
17
<input type="checkbox" id="check2" tabIndex="2" /><br />
18
<input type="checkbox" id="check3" tabIndex="3" /><br />
19
20
<input type="button" onclick="changeTabIndex()"
21
value="Change tabIndex" />
22
</form>
23
24
</body>
25
</html>
26