getElementById.contentDocument error in IE

后端 未结 6 467
不思量自难忘°
不思量自难忘° 2020-11-30 10:57

   

        
6条回答
  •  日久生厌
    2020-11-30 11:38

    From this page:

    Mozilla supports the W3C standard of accessing iframe's document object through IFrameElm.contentDocument, while Internet Explorer requires you to access it through document.frames["name"] and then access the resulting document.

    So you need to detect the browser and on IE do something like this instead:

    document.frames['iView'].document; 
    

提交回复
热议问题