< textarea ... /> [英] <textarea ... />

查看:49
本文介绍了< textarea ... />的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



大家好,


我刚遇到问题,其中Mozilla 1.6不接受XHTML 1.0页面

包含


< p>< textarea cols =" 50"名称= QUOT; prod_prob_description"行= QUOT; 4英寸/>< / p>


它不接受结束标记/>,但选择了所有内容后直到

EOF作为文本内的文本textarea。


我试图理解标准声称结束标签需要
。该示例仅命名结尾元素:< / textarea> ;.


我没有找到真正的声明在哪里以及如何应用短的

版本/>元素内。


是浏览器错误还是HTML设计错误?结束标记的匹配

的定义,如果不是
http://www.w3.org/TR/1999/REC-html40...224/html40.txt


谢谢,

马丁


Hi all,

I just had a problem where Mozilla 1.6 did not accept a XHTML 1.0 page
that contained

<p><textarea cols="50" name="prod_prob_description" rows="4" /></p>

It did not accept the end tag />, but selected everything after til the
EOF as text within the textarea.

I tried to understand the standard which claims that an end tag is
required. The example names the ending element only: </textarea>.

I did not find a real declaration where and how to apply the short
version of /> within the element.

Is it a browser error or a HTML design error? Where''s the matching
definition of the end tag, if not
http://www.w3.org/TR/1999/REC-html40...224/html40.txt ?

Thanks,
Martin

推荐答案

Martin Trautmann< t - *** @ gmx.net>写道:
Martin Trautmann <t-***@gmx.net> wrote:
我刚遇到一个问题,Mozilla 1.6不接受包含

< p>< textarea的XHTML 1.0页面COLS = QUOT; 50"名称= QUOT; prod_prob_description"行= QUOT; 4英寸/>< / p为H.


虽然在XHTML下允许使用,但建议不要使用

,特别是如果您以text / html的形式提供页面并应用

其他附录C黑客让浏览器认为它是HTML。

它不接受结束标记/>,但选择了所有内容,直到
EOF为文本在textarea内。


我的猜测(因为你没有提供URL)是你以text / html的形式提供你的

页面,因此Mozilla会对它们进行处理作为HTML。

我试图了解声称需要结束标记的标准。该示例仅命名结尾元素:< / textarea>。


哪个标准?在HTML中,textarea需要结束标记。

<!ELEMENT TEXTAREA - - (#PCDATA) - 多行文本字段 - >

- - 意味着需要开始和结束标签。

我没有找到真实的声明在哪里以及如何应用短的
版本的/>在元素内。


在XHTML中,所有元素都需要关闭。这可以通过

来完成,包括结束标记或用/>终止开始标记。


但是对于WWW上的文件必须是与HTML兼容

用户代理建议您使用所有元素的结束标记

未声明为空。请参阅 http://www.w3.org/TR/xhtml1/#C_3

Textarea未声明为空。

是浏览器错误还是HTML设计错误?结束标记的匹配定义在哪里,如果不是
http://www.w3.org/TR/1999/REC-html40...224/html40.txt
I just had a problem where Mozilla 1.6 did not accept a XHTML 1.0 page
that contained

<p><textarea cols="50" name="prod_prob_description" rows="4" /></p>
Whilst that is allowed under XHTML it is recommended against,
especially if you were serving the page as text/html and applying the
other Appendix C hacks to make browsers think that it''s HTML.
It did not accept the end tag />, but selected everything after til the
EOF as text within the textarea.
My guess (as you didn''t supply a URL) is that you are serving your
pages as text/html and thus Mozilla is treating them as HTML.
I tried to understand the standard which claims that an end tag is
required. The example names the ending element only: </textarea>.
Which standard? In HTML the end tag is required for textarea.
<!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field -->
The - - means that both start and end tags are required.
I did not find a real declaration where and how to apply the short
version of /> within the element.
In XHTML all elements are required to be closed. That can be done by
either including the end tag or by terminating the start tag with />.

However for documents on the WWW which must be compatable with HTML
user agents you are recommended to use the end tag for all elements
that are not declared as empty. See http://www.w3.org/TR/xhtml1/#C_3
Textarea is not declared as empty.
Is it a browser error or a HTML design error? Where''s the matching
definition of the end tag, if not
http://www.w3.org/TR/1999/REC-html40...224/html40.txt ?




这是HTML 4规范,我以为你说你使用的是XHTML 1.0?


Steve


-

我的理论给你起见,我的异端邪说激怒了你,

我从不回信,你也不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>



That''s the HTML 4 spec, I thought you said you were using XHTML 1.0?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>


Martin Trautmann< t - *** @ gmx.net>写道:
Martin Trautmann <t-***@gmx.net> wrote:
我刚遇到一个问题,Mozilla 1.6不接受包含

< p>< textarea的XHTML 1.0页面COLS = QUOT; 50"名称= QUOT; prod_prob_description"行= QUOT; 4英寸/>< / p>

它不接受结束标记/>,但在文本区域中将文本作为文本后选择了所有内容。

我没有找到真正的声明在哪里以及如何应用/
的简短版本在元素内。


像textarea这样的非空元素不应该快速关闭,这样做

应该在xhtml作为xhtml提供时工作,但是在服务时这样做

因为text / html很容易导致问题。

是浏览器错误还是HTML设计错误?
I just had a problem where Mozilla 1.6 did not accept a XHTML 1.0 page
that contained

<p><textarea cols="50" name="prod_prob_description" rows="4" /></p>

It did not accept the end tag />, but selected everything after til the
EOF as text within the textarea.

I tried to understand the standard which claims that an end tag is
required. The example names the ending element only: </textarea>.

I did not find a real declaration where and how to apply the short
version of /> within the element.
Non empty elements like textarea should not be quick closed, doing so
should work when xhtml is served as xhtml, but doing so when serving it
as text/html could easily cause problems.
Is it a browser error or a HTML design error?




这是与使用xhtml相关的问题之一,快速关闭非空元素空元素不再被验证者识别为错误。停止

对自己和浏览器说谎并使用html严格。


-

Spartanicus



It''s one of the problems associated with using xhtml, quick closing non
empty elements is no longer recognized as an error by a validator. Stop
lying to yourself and browsers and use html strict.

--
Spartanicus


2005年3月3日星期四,Martin Trautmann写道:
On Thu, 3 Mar 2005, Martin Trautmann wrote:
我刚遇到一个问题,Mozilla 1.6不接受XHTML 1.0页面


是什么媒体类型? URL?

包含

< p>< textarea cols =" 50"名称= QUOT; prod_prob_description"行= QUOT; 4英寸/>< / p>

它不接受结束标记/>


所以不要这样做。

,但是在文本区域中将文本作为文本后选择了所有内容。


天哪,如果我不知道更好,我会开始认为它真的很明白

SGML!

我试图了解声称需要结束标签的标准。该示例仅命名结尾元素:< / textarea>。


这就是答案。

我没有找到真正的声明在哪里以及如何应用/
的简短版本;在元素内。


当且仅当元素是自终止的(例如< br />)

是浏览器错误还是HTML设计错误?
I just had a problem where Mozilla 1.6 did not accept a XHTML 1.0 page
Served as what media type? URL?
that contained

<p><textarea cols="50" name="prod_prob_description" rows="4" /></p>

It did not accept the end tag />
So don''t do that.
, but selected everything after til the
EOF as text within the textarea.
Gosh, if I didn''t know better, I''d start to think it really understood
SGML!
I tried to understand the standard which claims that an end tag is
required. The example names the ending element only: </textarea>.
So that''s the answer.
I did not find a real declaration where and how to apply the short
version of /> within the element.
If and only if the element is self-terminating (such as <br />)
Is it a browser error or a HTML design error?




更有可能是文档作者未能应用

XHTML / 1.0附录C的规则(假设你是以此作为

text / html)。



More likely a failure by the document author to apply the rules of
XHTML/1.0 Appendix C (assuming that you''re serving this out as
text/html).


这篇关于&lt; textarea ... /&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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