how to set value in get element by id code example Example: set value using javascript Click to copydocument.getElementById("myText").value = "your string";