案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function changeTabIndex()
5
{
6
document.getElementById('1').tabIndex="3"
7
document.getElementById('2').tabIndex="2"
8
document.getElementById('3').tabIndex="1"
9
}
10
</script>
11
</head>
12
<body>
13
<p><a id="1" href="//www.w3xue.com">1</a></p>
14
<p><a id="2" href="//www.w3xue.com">2</a></p>
15
<p><a id="3" href="//www.w3xue.com">3</a></p>
16
17
<input type="button" onclick="changeTabIndex()"
18
value="Change TabIndex" />
19
20
<p>Try navigating the links by using the "Tab" button on you keyboard before and after pushing the "Change TabIndex" button.</p>
21
22
</body>
23
</html>