I am confused on what is the difference between .innerHTML and .value in JavaScript. Here is my code:
Input string: &
value refers to the value of an input element (or textearea)
value would be "hello world" (or any value typed inside)
innerHTML refers to the contents inside an HTML element.
All tags and their children are include in innerHTML.
All this is part of innerHTML.
innerHTML of the div tag would be the string:
'
All tags and their children are include in innerHTML.
All this is part of innerHTML.'