logo

New Response

« Return to the blog entry

You are replying to:

  1. Yes, the DOM is pretty nice to have sometimes :) I really like:

    document.getElementsByTagName("<tagname>")

    or even better:

    document.getElementById("<id>").getElementByTagName("<tagname>")

    ..to get a nice collection of wanted elements....

    However, using the DOM is often a performance killer... in general is much slower than innerHTML.

    IE, Mozilla and Safari (among others) all supports innerHTML, so if you plan to generate a lot of html fragments and know the User-Agents that will access the pages, it might we worth to test the different methods...

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: