First of all, let me tell you the difference between the innerhtml,innertext,value I think.
InnerHTML is to add HTML code to the control, which is to set the HTML inside an element.
eg
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<title>insert title here</title>
<body>
<p id= "Demo" >my first paragraph.</p>
<script>
document.getElementById ("Demo"). Innerhtml= "</script>
</body>
InnerText adding text to a control
<body>
<p id= "Demo" >my first paragraph.</p>
<script>
document.getElementById ("Demo"). innertext= "</script>
</body>
Value= "" I understand that the Value property in the control is directly assigned to something in double quotes.
[HTML] View plain copy
<body>
<p id= "Demo" >my first paragraph.</p>
<input id= "Input" type= "text" ></input>
<script>
document.getElementById ("Input"). Value= "</script>
</body>
For example, <input/> has the Value property to display content when it is <input value= "content"/> instead of <input > Content <input/>
The difference between the Innerhtml,innertext,value in JS