innerHTML test in XHTML - IE ERROR

I don't think you can really use innerHTML with XHTML, but anyway. In fact this example is not dependant on XHTML at all, it is simple plain HTML.

Basically in IE, you get an "Unknown runtime error" if you try to use innerHTML to write a DIV into a P! (It's not valid anyway, but hey.) You can, however, use the DOM methods createElement(), replaceChild() etc. to do this and it works in IE6, FF and Opera - although it is hardly valid!


To be Replaced


To be Replaced


[Home]