add a value to an input type text js code example Example: javascript add value to input document.getElementById("myText").value = "Johnny Bravo";