Set the value of an input field
Posted By: Anonymous
How would you set the default value of a form <input>
text field in JavaScript?
Solution
This is one way of doing it:
document.getElementById("mytext").value = "My value";
Answered By: Anonymous
Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.