A元素中没有目标属性(XHTML 1.0) [英] No target attribute in the A element (XHTML 1.0)
问题描述
When using the XHTML 1.0 validator at http://validator.w3.org/check, an
error will be raised for every instance of a "target" attribute in "A"
elements. Is it truely because it is not part of this specification
anymore, or is it an error in the SGML parser ? Any alternatives ?
html code :
<a href="./page.html" class="pagelink" target="_self">some text</a>
used doctype :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Result received :
This page is not Valid XHTML 1.0 Strict!
Line 66, column 66: there is no attribute "target" (explain...).
<a href="./page.html" class="pagelink" target="_self">some text</a>
Mark van Ballegooijen
推荐答案
Mark van Ballegooijen写道:
Mark van Ballegooijen wrote:
在 http://validator.w3.org/check ,将针对目标的每个实例引发
错误。属性在A元素中。这是真的,因为它不再是本规范的一部分了,还是SGML解析器中的错误?任何替代方案?
HTML代码:
< a href =" ./ page.html"类= QUOT; pagelink" target =" _self"> some text< / a>
使用的doctype:
<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0严格// EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
收到的结果:
此页面无效XHTML 1.0严格!
第66行,第66列:没有属性target (解释......)。
< a href =" ./ page.html"类= QUOT; pagelink" target =" _self">一些文字< / a>
When using the XHTML 1.0 validator at http://validator.w3.org/check, an
error will be raised for every instance of a "target" attribute in "A"
elements. Is it truely because it is not part of this specification
anymore, or is it an error in the SGML parser ? Any alternatives ?
html code :
<a href="./page.html" class="pagelink" target="_self">some text</a>
used doctype :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Result received :
This page is not Valid XHTML 1.0 Strict!
Line 66, column 66: there is no attribute "target" (explain...).
<a href="./page.html" class="pagelink" target="_self">some text</a>
您是否尝试使用框架?
我猜不是,所以,你为什么要使用目标?没有目标,
任何链接都将在同一个窗口中打开,您似乎需要使用_self...
>
据我所知,目标属性不是XHTML的一部分,
并且只能在框架集中使用。
它'不是HTML 4.01严格的一部分。
-
Els
Mentehumanaécomo PARA-quedas; funciona melhor aberta。
Are you trying to use frames?
I guess not, so, why are you using target? Without a target,
any link will open in the same window, which you seem to
want, using "_self"...
As far as I know, the target attribute isn''t part of XHTML,
and was only intended to be used within a frameset.
It''s not part of HTML 4.01 Strict either.
--
Els
Mente humana é como pára-quedas; funciona melhor aberta.
Els写道:
Els wrote:
Mark van Ballegooijen写道:
Mark van Ballegooijen wrote:
在 http://validator.w3.org/上使用XHTML 1.0验证程序时检查,
将针对目标的每个实例引发错误。属性在
A中元素。这是真的,因为它不再是这个规范的一部分了,还是SGML解析器中的错误?任何
替代品?
HTML代码:
< a href =" ./ page.html"类= QUOT; pagelink" target =" _self"> some text< / a>
使用的doctype:
<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0严格// EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
收到的结果:
此页面无效XHTML 1.0严格!
第66行,第66列:没有属性target (解释......)。
< a href =" ./ page.html"类= QUOT; pagelink" target =" _self"> some text< / a>
When using the XHTML 1.0 validator at http://validator.w3.org/check,
an error will be raised for every instance of a "target" attribute in
"A" elements. Is it truely because it is not part of this
specification anymore, or is it an error in the SGML parser ? Any
alternatives ?
html code :
<a href="./page.html" class="pagelink" target="_self">some text</a>
used doctype :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Result received :
This page is not Valid XHTML 1.0 Strict!
Line 66, column 66: there is no attribute "target" (explain...).
<a href="./page.html" class="pagelink" target="_self">some text</a>
您是否尝试使用框架?
我想不是,所以,为什么要使用目标?没有目标,任何链接
将在你想要的同一个窗口中打开,使用_self...
据我所知,目标属性是'n'是XHTML的一部分,只是打算在框架集中使用。
它也不是HTML 4.01 Strict的一部分。
Are you trying to use frames?
I guess not, so, why are you using target? Without a target, any link
will open in the same window, which you seem to want, using "_self"...
As far as I know, the target attribute isn''t part of XHTML, and was only
intended to be used within a frameset.
It''s not part of HTML 4.01 Strict either.
不,我不是在使用框架。
你对窗户的看法是正确的,_我自己就是现在这样的,所以它是
实际上没用。我使用它的原因是我希望链接
到我自己的网站/服务器上的页面在当前窗口中打开
(_self),以及外部链接一个新窗口(_blank)。如果确实弃用了这个
属性,那么对于target =" _blank"是否有一个
的替代方案。在新/空白窗口中打开超链接?
Mark van Ballegooijen
No, I''m not using frames.
You''re right about the window though, _self is the current one so it''s
actually quite useless. The reason i use it is that i would like links
to pages on my own website/server to be opened in the current window
(_self), and external links in a new window (_blank). If this
attribute is indeed deprecated, which seems to be the case, is there an
alternative to target="_blank" to open hyperlinks in a new/blank window ?
Mark van Ballegooijen
2004年2月20日星期五,Mark van Ballegooijen写道:
On Fri, 20 Feb 2004, Mark van Ballegooijen wrote:
在 http使用XHTML 1.0验证器时://validator.w3.org/check ,将针对目标的每个实例引发错误。属性在A元素中。这是真的,因为它不再是本规范的一部分了,还是SGML解析器中的错误?任何替代方案?
When using the XHTML 1.0 validator at http://validator.w3.org/check, an
error will be raised for every instance of a "target" attribute in "A"
elements. Is it truely because it is not part of this specification
anymore, or is it an error in the SGML parser ? Any alternatives ?
避免像瘟疫这样的帧!
Avoid frames like the plague!
这篇关于A元素中没有目标属性(XHTML 1.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!