推荐答案 " Aaron Gray" < an ******** @ gmail.comwrote in message news:6d ************ @ mid.individual.net ... "Aaron Gray" <an********@gmail.comwrote in messagenews:6d************@mid.individual.net... if(!document.documentElement) document.documentElement = getDocumentRoot(); if (!document.documentElement) document.documentElement = getDocumentRoot(); 次要行为修正: - if(!document.documentElement) { document.documentElement = getDocumentRoot(); document.documentElement.readOnly = true; } Aaron Minor behavioural amendment :- if (!document.documentElement){document.documentElement = getDocumentRoot();document.documentElement.readOnly = true;} Aaron Aaron Grayaécrit: Aaron Gray a écrit : " Aaron Gray" < an ******** @ gmail.comwrote in message news:6d ************ @ mid.individual.net ... "Aaron Gray" <an********@gmail.comwrote in messagenews:6d************@mid.individual.net... 您的页面测试适用于我的Fx.3 (虽然它不符合W3C) Your page-test works well with my Fx.3(while it is not W3C compliant) > if(!document.documentElement) document.documentElement = getDocumentRoot(); > if (!document.documentElement) document.documentElement = getDocumentRoot(); 次要行为修正: - if(!document.documentElement) { document.documentElement = getDocumentRoot(); Minor behavioural amendment :- if (!document.documentElement) { document.documentElement = getDocumentRoot(); 我的想法是不会使用下一行。 ''HTML''已写在页面上 因此,可能没有更多现有的JS。 on my idea the next line will be not used. ''HTML'' has been written on the pageso, probably, there is no more existing JS. document.documentElement.readOnly = true; } document.documentElement.readOnly = true; } if(!document.documentElement) { document.documentElement = getDocumentRoot(); document.documentElement.readOnly = true; alert(''vu''); } 警报没有开火 - sm if (!document.documentElement){document.documentElement = getDocumentRoot();document.documentElement.readOnly = true;alert(''vu'');} the alert doesn''t fire --sm " ; SAM" < st ********************* @ wanadoo.fr.invalidwrote in message news:48 ******* ************** @ news.orange.fr ... "SAM" <st*********************@wanadoo.fr.invalidwrote in messagenews:48*********************@news.orange.fr... Aaron Grayaécrit: Aaron Gray a écrit : >" Aaron Gray" < a ******** @ gmail.comwrote in message 新闻:6d ************ @ mid.individual.net ... >"Aaron Gray" <an********@gmail.comwrote in messagenews:6d************@mid.individual.net... 您的页面测试适用于我的Fx.3 (虽然它不符合W3C标准) Your page-test works well with my Fx.3(while it is not W3C compliant) >> if(!document.documentElement) document.documentElement = getDocumentRoot(); >> if (!document.documentElement) document.documentElement = getDocumentRoot(); 次要行为修正: - if(!document.documentElement) {/> document.documentElement = getDocumentRoot(); Minor behavioural amendment :- if (!document.documentElement) { document.documentElement = getDocumentRoot(); 关于我的想法,下一行将不会被使用。 ''HTML''已写在页面上 因此,可能没有更多现有的JS。 on my idea the next line will be not used.''HTML'' has been written on the pageso, probably, there is no more existing JS. 太棒了。 Great. > document.documentElement.readOnly = true; } > document.documentElement.readOnly = true; } if(!document.documentElement) { document.documentElement = getDocumentRoot(); document.documentElement.readOnly = true; alert(''vu''); } 警报不会触发 if (!document.documentElement) { document.documentElement = getDocumentRoot(); document.documentElement.readOnly = true; alert(''vu''); }the alert doesn''t fire 好的Fx.3当时不支持readOnly属性。 多亏了AFAICS并没有真正解决这个问题:( Aaron Okay Fx.3 does not support the readOnly attribute then. Thats annoying as AFAICS theres no real fix for that :( Aaron 这篇关于在W3C之前的DOM浏览器上模拟document.documentElement的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-22 00:56