如何使用 HTML 中的制表顺序(制表键盘按钮)来指定元素的使用?
在 HTML 中使用 tabindex 特性来设置元素的制表顺序。它让你可以在键盘上更改 TAB 使用的顺序。
你可以尝试运行以下代码来在 HTML 中创建元素的制表顺序 −
示例
<!DOCTYPE html>
<html>
<body>
<a href = "https://tutorialspoint.com/current_affairs/index.htm" tabindex="1">Current Affairs</a>
<br>
<a href = "https://tutorialspoint.com/codingground.htm" tabindex="2">Coding Ground</a>
<br>
<a href = "https://tutorialspoint.com/verbal_ability/index.htm" tabindex="4">Verbal Ability</a>
<br>
<a href = "https://tutorialspoint.com/quantitative_aptitude/index.htm" tabindex="3">Quantitative Aptitude</a>
<br>
<p>We have changed the tab order above. Use TAB on keyboard to view the changes.</p>
</body>
</html>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP