set value of input in javascript

JavaScript
document.getElementById("myText").value = "your string"; 
Source

Also in JavaScript: