Articles :: JavaScript :: DOM or InnerHTML?

written by Toby Miller on August 2, 2005
August 2, 2005

I have always struggled with whether I should use innerHTML or the DOM methods; createElement and createTextNode. Everyone keeps telling me that I should use the DOM methods because they're the proper way to do it. I've always been a big supporter of the W3C efforts, so I naturally want to use the DOM methods. Unfortunately whenever I've tried to use the DOM methods I've ended up with a sluggish application. Everyone thought I was crazy, but this article shows that I probably wasn't crazy (at least about this). =)

So, without delay:

Quirksmode - W3C DOM vs. innerHTML
http://www.quirksmode.org/dom/innerhtml.html

permalink                                                                                                                                                                          
   Natural Living (5)
      Heating & Cooling (1)
      Herbal Remedies (1)
   Personal (0)
      Family (1)
      Humor (11)
      Miscellaneous (1)
      Politics (5)
   Technology (2)
      System Administration (4)
            Linux (1)
            Solaris (0)
      Web Development (2)
            CSS (3)
            Design (1)
            Flash (1)
            JavaScript (11)
            PHP (1)
                        CakePHP (1)
            Web Browsers (2)
                        Firefox (1)
                        Internet Exploder (0)
                        Netscape (1)
printed @ tobymiller.com
(currently rendering CSS for Internet Explorer)(currently rendering CSS for non-Internet Explorer browsers)