<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>W3Cschool教程(w3cschool.cn)</title>
<script>
function changeTabIndex(){
document.getElementById('1').tabIndex="3";
document.getElementById('2').tabIndex="2";
document.getElementById('3').tabIndex="1";
}
</script>
</head>
<body>
<p><a id="1" href="http://www.w3cschool.cn">1</a></p>
<p><a id="2" href="http://www.w3cschool.cn">2</a></p>
<p><a id="3" href="http://www.w3cschool.cn">3</a></p>
<input type="button" onclick="changeTabIndex()" value="改变标签索引">
<p>试着先使用“Tab”按钮导航到链接之后你单击“改变标签索引”按钮。</p>
</body>
</html>