tabIndex 属性可为链接设置或返回 tab 键控制次序。
anchorObject.tabIndex=tabIndex
下面的例子可更改三个链接的 tab 键控制次序:
<HTML>
<head>
<script type="text/JavaScript">
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="https://www.365jz.com">1</a></p>
<p><a id="2" href="https://www.365jz.com">2</a></p>
<p><a id="3" href="https://www.365jz.com">3</a></p>
<input type="button" onclick="changeTabIndex()"
value="Change TabIndex" />
</body>
</html>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛