Setting innerHTML vs. setting value with Javascript
value
is for form elements, innerHTML
if you want to set the content of any other element.
There's also innerText
if you want to set the text content (you won't have to escape anything in there, but no HTML works in there)
Setting the value
is normally used for input/form elements. innerHTML
is normally used for div, span, td and similar elements.
Here is a link showing the use of ID.value: http://www.javascript-coder.com/javascript-form/javascript-form-value.phtml