document.getElementById(\"test\").value
document.getElementById(\"test\").innerHTML
Does the first mean the address and the second mean the value
It has to do with how some tags work based on their attributes where others work on the text between the opening and closing tags.
.value retrieves whatever value is set for the value attribute of the tag. .innerHTML retrieves whatever is in between the opening and closing tag.
For example if the HTML tag was
and you used the JavaScript
var name = document.getElementById('user_name').value
would declare a variable name and give it the value "Enter name here" (assuming the user didn't change it). On the other hand if you have HTML like
then you would use
var text = document.getElementById('abc')
and that would set the variable text to "blah blah".