Changing content using innerHTML with a non-standard element in Internet Explorer
Posted
by
Gus
on Stack Overflow
See other posts from Stack Overflow
or by Gus
Published on 2011-06-23T19:06:05Z
Indexed on
2011/06/24
0:22 UTC
Read the original article
Hit count: 248
I have the non-standard element
<testele></testele>
In every browser except IE, this bit of JavaScript will successfully change the content of the above element
document.getElementsByTagName("testele")[0].innerHTML = 'hi';
However, if I change the <testele>
to just a <span>
(in the HTML and the JavaScript), it now successfully changes the content of the element in every browser, including IE.
Is there any fix? I have searched around and tried a bunch to no avail.
© Stack Overflow or respective owner