Value is the value owned by the label with the Value property. is generally the attribute of a single closed tag. (value can be assigned or obtained)
The innerHTML property, a double-closing label between two tags. (identification tag) (can be assigned, can also get values)
The InnerText property, a double-closing label between two tags. (does not recognize tags) (can be assigned, can also get values)
The Textcontent property is similar to InnerText and the old version of Firefox supports this property (no old version, not printed). (value can be assigned or obtained)
<! DOCTYPE html>Hello</div> <div id= "Box2" > <ul> <li> I am the InnerText property gets the value </li> </UL&G THello</div> <script>Console.log (document.getElementById ("INP"). Value) Console.log (document.getElementById ("Box"). InnerHTML); //document.getElementById ("box"). InnerHTML = "<li> I am the li</li> of the assignment";Console.log (document.getElementById ("Box2"). InnerText); </script></body>
Value,innerhtml,innertext,textcontent Property