W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<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.w3school.org.cn">1</a></p> <p><a id="2" href="https://www.w3school.org.cn">2</a></p> <p><a id="3" href="https://www.w3school.org.cn">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>