I would use innerHTML, document.write can replace the whole place so if you ever have a input or div onclick for example and it does document.write ('Hello') it will do that exactly. basically overwrite the document and write Hello where as innerHTML will just change the content on that div.
you have more control with innerHTML
:)
Main Topics
Browse All Topics





by: christophermccannPosted on 2009-10-09 at 14:12:08ID: 25538914
you dont need to use ( ) around the inner html. as per below. I also changed your code a wee tiny bit.
Select allOpen in new window