Monday, August 16, 2010

Funny behavior of IE6

If you happened to user innerHTML with IE6, you will be scratching with your head as to why the innerHTML can never match your string despite that the string you defined in javascript and html are exactly the same.

It turned out that IE6 (for no apparent reason) added one extra space behind the string when you use javascript innerHTML property to get the text from the html tag.

No comments:

Post a Comment