编辑下面的代码:【加编码】
<html> <head> <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="/">1</a></p> <p><a id="2" href="/">2</a></p> <p><a id="3" href="/">3</a></p> <input type="button" onclick="changeTabIndex()" value="Change TabIndex"> <p>Try navigating the links by using the "Tab" button on you keyboard before and after pushing the "Change TabIndex" button.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂