如何禁用 <a> 的选项卡标签 [英] How do I disable tabs for <a> tag
本文介绍了如何禁用 <a> 的选项卡标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 标签作为网页上的链接.如何禁用 Tab 键选择其中任何一个?
I am using <a>
tags for links on a web page. How do I disable the Tab key from selecting either of them?
推荐答案
您好,此答案的原作者.不要用这个.向下滚动.StackOverflow 不会让我删除这个答案,因为它被接受了.
Hi, original author of this answer here. Don't use this one. Scroll down. StackOverflow won't let me remove this answer since it was accepted.
您可以对这些链接执行以下操作:
You could do something like this for those links:
<a href="http://foo.bar" onfocus="this.blur()">Can't focus on this!</a>
不过,您应该使用下面的答案.
You should use the answer below, though.
https://stackoverflow.com/a/457115/974680
这篇关于如何禁用 <a> 的选项卡标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文