javascript set input field value

JavaScript
document.getElementById("myInputID").value = "My Value"; //set value on myInputIDdocument.getElementById("myText").value = "your string"; 
Source

Also in JavaScript: