Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox vs. IE: innerHTML handling

After hours of debugging, it appears to me that in FireFox, the innerHTML of a DOM reflects what is actually in the markup, but in IE, the innerHTML reflects what's in the markup PLUS any changes made by the user or dynamically (i.e. via Javascript).

Has anyone else found this to be true? Any interesting work-arounds to ensure both behave the same way?

like image 517
Steve M Avatar asked Aug 31 '08 11:08

Steve M


1 Answers

I use jQuery's .html() to get a consistent result across browsers.

like image 182
Pat Avatar answered Oct 16 '22 23:10

Pat