2011-06-06 69 views
1

对于某些URL(例如http://www.nyest.hu/iframe/240/10),IE8(及更早版本)从未停止加载,但出现以下错误消息:SCRIPT123: This command is not supported.错误行号指向document.write命令。 IE9和其他浏览器加载页面没有问题。IE8在document.write上挂起,并且“不支持该命令”

+0

不确定这一点,但我相信有一些doctypes不支持document.write。什么doctype是页面?你有没有尝试过使用不同的文档类型? (HTML代替XHTML) – GordonM 2011-06-06 06:00:50

+0

@GordonM:类似的东西,但它是导致问题的MIME类型('application/xhtml + xml'),而不是doctype(过渡XHTML)。该页面不在我的控制之下。 – Tgr 2011-06-06 06:39:28

回答

1

显然这是因为该页面以XML形式提供,并且there is no document.write in an XML document。其他浏览器也会在document.write命令中引发某种错误,但它们会更好地处理错误,并完成加载页面。

+1

请参阅[Mozilla web开发人员常见问题](https://developer.mozilla.org/en/Mozilla_Web_Developer_FAQ#How_is_the_treatment_of_application.2fxhtml.2bxml_documents_different_from_the_treatment_of_text.2fhtml_documents.3f)。 – Keith 2011-06-06 06:05:55