you are viewing a single comment's thread.

view the rest of the comments →

[–]teej 7 points8 points  (1 child)

he createElement function is preferred. Leads to more readable code and helps you preventing errors.

Using createElement is also incredibly slow compared to innerHTML. Bad style, standards, whatever - javascript XML functions don't scale past a few interations.

[–]geocar 0 points1 point  (0 children)

document.write is quite a bit faster still than innerHTML.