搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
HTML参考手册
HTML 属性
源代码
清空
点击运行
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML tabindex 属性的使用(大卫编程网 div.cn)</title> </head> <body> <div tabindex="1">div.cn</div><br> <div tabindex="3">google.com</div><br> <div tabindex="2">microsoft.com</div> <script> // At start, set focus on the first div document.getElementsByTagName('div')[0].focus(); </script> <p tabindex="4"><b>Note:</b> Try navigating the elements by using the "Tab" button on your keyboard.</p> </body> </html>
运行结果