I am confused on what is the difference between .innerHTML and .value in JavaScript. Here is my code:
<body>
Input string: <input type="text" id="input" />
....
</body>
When I use this code I cannot get the content of input string:
var str=document.getElementById("input").innerHTML;
While I use the following code, it works:
var str=document.getElementById("input").value;
Any one knows what is the difference between them?