Result Size: 625 x 534
x
 
<!DOCTYPE html>
<html>
<body>
<p>在单击“更改 TabIndex”按钮之前和之后,尝试使用键盘上的“Tab”按钮浏览以下链接。</p>
<p><a id="myAnchor1" href="https://www.begtut.com">链接 1</a></p>
<p><a id="myAnchor2" href="https://www.begtut.com">链接 2</a></p>
<p><a id="myAnchor3" href="https://www.begtut.com">链接 3</a></p>
<input type="button" onclick="myFunction()" value="更改 TabIndex">
<script>
function myFunction() {
  document.getElementById("myAnchor1").tabIndex = "3";
  document.getElementById("myAnchor2").tabIndex = "2";
  document.getElementById("myAnchor3").tabIndex = "1";
}
</script>
</body>
</html>