验证我的网页 [英] Validating my pages

查看:73
本文介绍了验证我的网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试着看看我的代码有多有效。经过验证的投诉跟

如下:

第12行,第32栏:没有属性TARGET (解释......)。

< FRAME NAME =" MAINMENU2" TARGET =" _top" SRC =" main%20menu.html"

SCROLLING =" AUTO" M


但是我的Html 4.01规范副本说该属性存在。

有什么问题?原始代码位于< http://akseli-yok.utu.fi:993>。

解决方案

Akseli M?ki写道:< blockquote class =post_quotes>我正在试图看看我的代码是多么有效。经过验证的投诉如下:
第12行,第32栏:没有属性TARGET (解释......)。
< FRAME NAME =" MAINMENU2" TARGET =" _top" SRC =" main%20menu.html"
SCROLLING =" AUTO" M

然而,我的Html 4.01规范副本说该属性存在。
有什么问题?原始代码位于< http://akseli-yok.utu.fi:993>。



您在哪里看到它:

< http://www.w3.org/TR/html401/present/frames.html#h-16.2.2> ?


您可以做的是放置< base />标记在您的主菜单4.中(这是

更多的保存,不要在文件名中使用空格,比如main-menu.html),如下所示:


< head>

<! - 这里所有其他头元素 - >

< base target =" _top">

< ; / head>


-

Anne van Kesteren

< http://www.annevankesteren.nl/> ;


Anne van Kesteren写道:

你在哪里看到它:
< http:// www .w3.org / TR / HTML401 /当前/ frames.html#H-16.2.2> ?
我正在查看属性列表。我没注意到FRAMES标签没有声明属性



你可以做的是放一个< base />标记在您的主菜单4.中(更多的是不要在文件名中使用空格,比如main-menu.html),如下所示:



我知道这个标签,但它转过来了out属性在这个地方没有用

我在哪里,它很肤浅。


On Sun,2003年11月16日12:05 :52 +0200,

Akseli M?ki< ak ************************* @ nic.fi>写道:

我正在试图看看我的代码是多么有效。经过验证的投诉如下:
第12行,第32栏:没有属性TARGET (解释......)。
< FRAME NAME =" MAINMENU2" TARGET =" _top" SRC =" main%20menu.html"
SCROLLING =" AUTO" M

然而,我的Html 4.01规范副本说该属性存在。
有什么问题?原始代码位于< http://akseli-yok.utu.fi:993>。




目标属性在框架元素中不可用,删除它。


如果你把它放在那里试图阻止其他人放你的

框架内的网站,这不是解决问题的方法。如果你因为任何其他原因而把它放在那里,你就错了。


你试过给每一帧element a target =" _top"属性,

意味着,如果浏览器注意到它,它会尝试将每个帧直接加载到浏览器窗口中(在...之外)一个

框架集)。那是不可能的(两者都在同一个地方,并且两者都可以看到
)。


此外,URI中禁止使用空格,对它们进行编码作为%20

是一个试图绕过一个要求的黑客。允许

包含空格,其中参数在*之后发送*(例如搜索

字符串)。


例如 http://www.example.com/cgi-bin/ searc ... thing%20spacey


-

我的来自地址完全是假的。 (提示:如果我想收到来自

的电子邮件,那就完全是陌生人了,我会放一个真正的电子邮件。)回复usenet

在同一个地方张贴当你阅读你回复的信息时。


I''m trying to see how valid my code is. The validated complained with
following:
Line 12, column 32: there is no attribute "TARGET" (explain...).
<FRAME NAME="MAINMENU2" TARGET="_top" SRC="main%20menu.html"
SCROLLING="AUTO" M

However my copy of Html 4.01 specification says that the attribute exists.
What''s wrong? The original code is at <http://akseli-yok.utu.fi:993>.

解决方案

Akseli M?ki wrote:

I''m trying to see how valid my code is. The validated complained with
following:
Line 12, column 32: there is no attribute "TARGET" (explain...).
<FRAME NAME="MAINMENU2" TARGET="_top" SRC="main%20menu.html"
SCROLLING="AUTO" M

However my copy of Html 4.01 specification says that the attribute exists.
What''s wrong? The original code is at <http://akseli-yok.utu.fi:993>.


Where did you see it:
<http://www.w3.org/TR/html401/present/frames.html#h-16.2.2> ?

What you can do is place a <base/> tag in your "main menu.html" (it is
more save not to use spaces in file name, like "main-menu.html") like this:

<head>
<!-- all other head elements here -->
<base target="_top">
</head>

--
Anne van Kesteren
<http://www.annevankesteren.nl/>


Anne van Kesteren wrote:

Where did you see it:
<http://www.w3.org/TR/html401/present/frames.html#h-16.2.2> ? I was looking at the list of attributes. I didn''t notice that the attribute
wasn''t declared for FRAMES tag.
What you can do is place a <base/> tag in your "main menu.html" (it is
more save not to use spaces in file name, like "main-menu.html") like this:


I know this tag, but it turns out the attribute has no use on the place
where I was using, it was superficial.


On Sun, 16 Nov 2003 12:05:52 +0200,
Akseli M?ki <ak*************************@nic.fi> wrote:

I''m trying to see how valid my code is. The validated complained with
following:
Line 12, column 32: there is no attribute "TARGET" (explain...).
<FRAME NAME="MAINMENU2" TARGET="_top" SRC="main%20menu.html"
SCROLLING="AUTO" M

However my copy of Html 4.01 specification says that the attribute exists.
What''s wrong? The original code is at <http://akseli-yok.utu.fi:993>.



The "target" attribute isn''t usable within a frame element, remove it.

If you''ve put that there to try and stop anybody else from putting your
site within a frame, that''s not the way to go about it. If you''ve put
it there for any other reason, you''ve got the wrong idea.

You''ve tried giving each frame element a target="_top" attribute, which
would mean, if a browser paid any attention to it, that it''d be trying
to load each frame directly into a browser window (outside of a
frameset). That''s not possible (both into the same spot, and both being
visible).

Additionally, blank spaces are forbidden in URIs, encoding them as %20
is a hack to try and get around a requirement. It is permitted to
include blank spaces with parameters sent *after* a URI (e.g. search
strings), though.

e.g. http://www.example.com/cgi-bin/searc...thing%20spacey

--
My "from" address is totally fake. (Hint: If I wanted e-mails from
complete strangers, I''d have put a real one, there.) Reply to usenet
postings in the same place as you read the message you''re replying to.


这篇关于验证我的网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆