+ 2
What is the difference between "value" and "innerHTML" in javascript
In some cases both "value" and "innerHTML" give the same result and in others the results are different.
1 Resposta
+ 3
Priyangshu
"value" is use in case of text boxes and "innerHTML" is use in case of html tags.
When you want to get or set value from any html tag then we have to use "innerHTML".
When you want to set or get value from any input field then we have to use "value".