<分区>
标签 css validation html
<分区>
Possible Duplicate:
Is it alright use to target=_blank in HTML5?
我有这个。
<a href="#foo" class="external" target="_blank" title="foo">www.foo.com</a>
以前 target="_blank"
用于重新运行验证错误。如果我记得正确的话,它曾经在 html5 之前声明过时的文档类型错误。然而,在 html5 文档类型中,这不再是验证错误,因此使用了 javascript。
这是否意味着它不再被弃用并且我不再需要 javascript 来实现此功能?
最佳答案
是的。
The target attribute on the a element was deprecated in a previous version of HTML, but is no longer deprecated, as it useful in Web applications, particularly in combination with the iframe element.
关于css - 将目标 ="_blank"用于 anchor 不再返回 html5 文档类型中的验证错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12644926/