how to change value attribute after enter text in box html js code example Example: set value using javascript document.getElementById("myText").value = "your string";