innerHTML和innerText
innerText在ie6上正常,在firefox上不能正常显示
innerHTML在IE6和Firefox上都正常。
比如:
document.getElementById("elementId").innHTML = "some infomation"
-------
document.all()在IE6上正常,在Firefox上不正常。
建议使用document.getElementById(id_str);
跨浏览器兼容性问题
本文探讨了innerHTML和innerText等属性在不同浏览器(如IE6和Firefox)中的表现差异,并提供了相应的解决方案,例如推荐使用document.getElementById替代document.all。
innerHTML和innerText
innerText在ie6上正常,在firefox上不能正常显示
innerHTML在IE6和Firefox上都正常。
比如:
document.getElementById("elementId").innHTML = "some infomation"
-------
document.all()在IE6上正常,在Firefox上不正常。
建议使用document.getElementById(id_str);