HTML DOM tabIndex ÊôÐÔ

¶¨ÒåºÍÓ÷¨

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="http://www.w3school.com.cn">1</a></p>
<p><a id="2" href="http://www.w3school.com.cn">2</a></p>
<p><a id="3" href="http://www.w3school.com.cn">3</a></p>

<input type="button" onclick="changeTabIndex()"
value="Change TabIndex" />

</body>
</html>
VUE