document.getElementById("test").value
document.getElementById("test").innerHTML
Does the first mean the address and the second mean the value stored at the address? Also, where can I find documentation on the value property?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
.valuegives you the currently-set value of a form element (input,select,textarea), whereas.innerHTMLbuilds an HTML string based on the DOM nodes the element contains.For a simple example, go to the JS Fiddle demo, and enter a new value into the
inputand then move out of the input.The test uses the following JavaScript:
(The above text updated, following a comment left by am not i am, in comments below.)