本文介绍了IE对XHTML 1.0 Transitional和HTML Transitional有同样的问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我已经读过IE在使用HTML文档类型时遇到的问题

4.01 Transitional。我被建议尽可能使用Strict。


我的问题是,这同样适用于XHTML 1.0 Transitional吗?我使用ASP.NET开发了

站点,它发出了有效的XHTML 1.0 Transitional,但没有

XHTML 1.0严格(例如,它包含一个带有
_VIEWSTATE的名称,在Strict无效,但在

Transitional)。


任何评论?框架很棒,但是我有点卡住

试图生成100%有效的代码。我可能有任何浏览器

XHTML 1.0 Transitional的问题吗?


TIA


-

Alan Silver

(此行下面添加的任何内容都与我无关)

Hello,

I have read about the problems that IE has when using a doctype of HTML
4.01 Transitional. I was advised to use Strict wherever possible.

My question is, does the same apply to XHTML 1.0 Transitional? I develop
sites using ASP.NET, which emits valid XHTML 1.0 Transitional, but not
XHTML 1.0 Strict (for example, it includes a hidden form field with the
name of _VIEWSTATE, which isn''t valid in Strict, but is in
Transitional).

Anyone any comments? The framework is brilliant, but I''m a bit stuck
trying to produce 100% valid code. Am I likely to have any browser
problems with XHTML 1.0 Transitional?

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)

推荐答案




不是真的。假设.net挤出附录C兼容XHTML

风味标签汤作为text / html,然后浏览器将其视为

Quirks Mode(X)HTML标签汤或标准模式(X)HTML标签汤

与HTML 4.01相同。


Steve



Not really. Assuming .net extrudes "Appendix C compliant XHTML
flavoured tag soup served as text/html", then browsers will treat it as
either Quirks Mode (X)HTML tag soup or Standards Mode (X)HTML tag soup
just the same as they would do with HTML 4.01.

Steve





呃,这里是我的无知开始显示的地方!我在谈论

避免怪异模式,我明白这是相当邪恶的。

怪癖模式是由没有
URL的HTML 4.01 Transitional doctype触发的( ie<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01
Transitional // EN">) - 请注意,它只是触发切换到怪癖模式的doctype。实际HTML是否与doctype匹配
不是因素。

标准模式由带有
URL的HTML 4.01 Transitional doctype触发(即<!DOCTYPE HTML PUBLIC " - // W3C // DTD HTML 4.01
Transitional // EN"" http://www.w3.org/TR/html4/loose.dtd">)和HTML
4.01严格的doctypes。


啊,我显然错了。我认为这是Transitional,

将IE发送到quirks模式而Strict则没有。感谢

澄清,这让生活变得更加轻松。

XHTML 1.0(严格或过渡)触发标准模式,除非
是XML声明(例如< ;?xml version =" 1.0" encoding =" UTF-8"?>)
在它之前触发Quirks模式。



Erm, here''s where my ignorance begins to show!! I was talking about
avoiding quirks mode, which I understand to be fairly evil.
Quirks mode is triggered by a HTML 4.01 Transitional doctype without an
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">) - note that it is merely the doctype that triggers
the switch to quirks mode. Whether the actual HTML matches the doctype
isn''t a factor.

Standards mode is triggered by a HTML 4.01 Transitional doctype with a
URL (i.e. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">) and by HTML
4.01 Strict doctypes.
Ah, I obviously got the story wrong. I thought it was Transitional that
sent IE into quirks mode and Strict that didn''t. Thanks for the
clarification, that makes life much easier.
XHTML 1.0 (Strict or Transitional) triggers Standards mode unless there
is an XML declaration (e.g. <?xml version="1.0" encoding="UTF-8"?>)
preceeding it in which case Quirks mode is triggered.




所以,如果我有这样的doctype ......


<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


这会给我标准模式?如果是这样,那么我想我已经解决了我的

问题。



So, if I have a doctype like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

will this give me standards mode? If so, then I think I have solved my
problem.



应该可以使.net挤出任何东西代码你想要它
。如果它不是,这是一个相当废话的工具。



It should be possible to make .net extrude whatever code you want it
to. It''s a fairly crap tool if it doesn''t.




有可能,我不知道。我知道默认情况下它会发出XHTML

1.0 Transitional(显然不像我发布的那样严格)。我用b $ b没问题,所以我还没有真正探索改变它的可能性。



It may be possible, I don''t know. I know that by default it emits XHTML
1.0 Transitional (apparently not Strict as I thought when I posted). I
don''t have a problem using that, so I haven''t really explored the
possibilities of changing it.



嗯?



Eh?



< snip>


好​​吧,我本可以得到那么厉害错误。我知道当我第一次开始修理一些代码时,我遇到了这类问题,但也许我现在感到很困惑。我需要回去再检查一下。


<snip>

OK, I could have got that badly wrong. I know that when I first started
fixing some code, I was getting problems of this sort, but maybe I''m
getting confused now. I''ll need to go back and check it again.



不是真的。假设.net挤出附录C兼容的XHTML
风味标签汤作为text / html,则浏览器会将其视为Quirks Mode(X)HTML标签汤或标准模式(X)HTML标签汤
与HTML 4.01一样。



Not really. Assuming .net extrudes "Appendix C compliant XHTML
flavoured tag soup served as text/html", then browsers will treat it as
either Quirks Mode (X)HTML tag soup or Standards Mode (X)HTML tag soup
just the same as they would do with HTML 4.01.




好​​吧,据我所知,它发出100%有效的XHTML 1.0 Transitional ,

排除奇怪的错误!!


非常感谢您的回复。我想你的澄清已经把我分类了

out。


-

Alan Silver

(这行下面添加的任何内容都与我无关。



Well, as far as I know, it sends out 100% valid XHTML 1.0 Transitional,
excluding the odd bug!!

Thanks very much for the reply. I think your clarification has sorted me
out.

--
Alan Silver
(anything added below this line is nothing to do with me)





是的......但是客户端XHTML充其量只是愚蠢[1],过去包含但是严格的HTML并不是几乎完全遗留的垃圾

应该避免的。



Yes ... but client-side XHTML is silly at best[1], and the bits of HTML that
Transitional includes but Strict doesn''t are almost entirely legacy junk
that should be avoided.




可能?不,但确实存在。 (问题是由于XHTML位

而不是过渡位)。


[1]嗯,有一些例外,但它们是非常罕见。

-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

首页是〜/ .bashrc的位置



Likely? No, but they do exist. (The problems there are due to the XHTML bit
rather than the Transitional bit though).

[1] Well, there are some exceptions, but they are exceptionally rare.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


这篇关于IE对XHTML 1.0 Transitional和HTML Transitional有同样的问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 03:28