使用document.createElementNS或document.createElement [英] using document.createElementNS or document.createElement
问题描述
看来这实际上是否使用
DOM2或DOM1之间存在差异。
我正在尝试使用XHTML为我的程序编写程序网页,但是,我/ b $ b必须使用DOM2 for xhtml 1.1。
现在,这对于浏览器兼容性有多大问题?
我使用php脚本将mime类型更改为正确的,或者基于Mozilla的浏览器为
application / xhtml + xml,为
休息。
看来IE 6的运行方式很好。
只使用命名空间作为规范?
非常感谢您的回复。
It appears that this is actually a difference between whether to use
DOM2 or DOM1.
I am trying to write my programs using XHTML for the webpage, but, I
have to use DOM2 for xhtml 1.1.
Now, how much of a problem will this be for browser compatibility?
I am using a php script to change the mime type to be correct, either
application/xhtml+xml for Mozilla based browsers, and html for the
rest.
It appears that IE 6 works fine this way.
Is it wrong to just use namespaces as a norm?
Thank you very much for any responses.
推荐答案
James Black写道:
James Black wrote:
看来这实际上是否使用
DOM2或DOM1之间存在差异。
我正在尝试使用XHTML为网页编写程序,但是,我必须将DOM2用于xhtml 1.1。
你不必,DOM2是DOM1的超集。
现在,这对于浏览器兼容性有多大问题?
你最好坚持使用DOM1,DOM2支持并不是IE中的闪存。
我使用php脚本来改变mime类型是正确的,要么
应用程序/ xhtml + xml用于基于Mozilla的浏览器,而html用于
休息。
似乎IE 6以这种方式工作正常。
仅仅是错误的使用命名空间作为规范?
It appears that this is actually a difference between whether to use
DOM2 or DOM1.
I am trying to write my programs using XHTML for the webpage, but, I
have to use DOM2 for xhtml 1.1.
You don''t have to, DOM2 is a superset of DOM1.
Now, how much of a problem will this be for browser compatibility?
You are better to stick with DOM1, DOM2 support isn''t that flash in IE.
I am using a php script to change the mime type to be correct, either
application/xhtml+xml for Mozilla based browsers, and html for the
rest.
It appears that IE 6 works fine this way.
Is it wrong to just use namespaces as a norm?
为什么要这么麻烦?如果你的所有文档都在一个命名空间中,为什么增加了
复杂度?我没有尝试过,但是我打赌你会发现所有的b
各种浏览器兼容性问题。
-
Ian Collins。
Why bother? If all of your document is in one namespace, why the added
complexity? I haven''t tried it, but I''d wager you will uncover all
sorts of browser compatibility issues.
--
Ian Collins.
Ian Collins写道:
Ian Collins wrote:
将名称空间用作标准是不对的?
Is it wrong to just use namespaces as a norm?
为什么要这么麻烦?如果您的所有文档都在一个命名空间中,为什么增加了复杂性?我没有尝试过,但我打赌你会发现所有类型的浏览器兼容性问题。
Why bother? If all of your document is in one namespace, why the added
complexity? I haven''t tried it, but I''d wager you will uncover all
sorts of browser compatibility issues.
我有两个或三个命名空间实际上,因为我正在使用我的文档混合mathml和
或许是svg。
这就是为什么我不得不考虑使用xhtml 1.1。
Thanx回复。
I have two or three namespaces actually, as I am mixing mathml, and
perhaps svg, with my document.
That is why I had to look at using xhtml 1.1.
Thanx for the response.
On 21/05/2006 02:22,James Black写道:
[snip]
On 21/05/2006 02:22, James Black wrote:
[snip]
现在,这对于浏览器兼容性有多大问题?
根据你在做什么,你可能需要写两个单独的
脚本:一个用于XHTML,一个用于HTML。
我使用php脚本将mime类型更改为正确的,基于Mozilla的浏览器的应用程序/ xhtml + xml,以及
休息的html。
Now, how much of a problem will this be for browser compatibility?
Depending on what you''re doing, you may need to write two separate
scripts: one for XHTML, one for HTML.
I am using a php script to change the mime type to be correct, either
application/xhtml+xml for Mozilla based browsers, and html for the
rest.
有很多非常糟糕的MIME实现[1]
类型导向的内容协商,显示完全无视RFC
2616.我希望你没有使用其中一个(并且确定Mozilla
显然不是特别有希望,因为其他浏览器支持XHTML,
)。
[snip]
Mike
[1] XHTML或HTML 4
作者:Michael Winter
组:alt.html
日期:2006-01-15 22:58:23 GMT
Message-Id :js***************@text.news.blueyonder.co.uk
内容协商问题在我的最后一篇文章中停止那线程
(#45)。
< http://groups.google.co.uk/group/alt.html/browse_frm/thread/ d3dee15034ffc6e7 / c1d909527cecdbe2>
-
Michael Winter
在通过电子邮件回复之前使用[新闻]作为前缀主题。
There have been a lot of very poor implementations[1] of MIME
type-oriented content negotiation that show complete disregard for RFC
2616. I hope you aren''t using one of them (and identifying Mozilla
explicitly isn''t particularly promising as other browsers support XHTML,
too).
[snip]
Mike
[1] XHTML or HTML 4
Author: Michael Winter
Group: alt.html
Date: 2006-01-15 22:58:23 GMT
Message-Id: js***************@text.news.blueyonder.co.uk
The issue of content negotiation stops at my final post in that thread
(#45).
<http://groups.google.co.uk/group/alt.html/browse_frm/thread/d3dee15034ffc6e7/c1d909527cecdbe2>
--
Michael Winter
Prefix subject with [News] before replying by e-mail.
这篇关于使用document.createElementNS或document.createElement的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!