案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script>
5
function changeTabIndex()
6
{
7
document.getElementById('1').tabIndex="3";
8
document.getElementById('2').tabIndex="2";
9
document.getElementById('3').tabIndex="1";
10
}
11
</script>
12
</head>
13
<body>
14
<p><a id="1" href="//www.w3xue.com">1</a></p>
15
<p><a id="2" href="//www.w3xue.com">2</a></p>
16
<p><a id="3" href="//www.w3xue.com">3</a></p>
17
18
<input type="button" onclick="changeTabIndex()"
19
value="更改 TabIndex">
20
21
<p>请在按下 “更改 TabIndex” 按钮前后事宜 tab 键在链接间导航。</p>
22
23
</body>
24
</html>