Change the text of the text field,
and then click the button below.
Name:
// Here the value is stored in new variable x function myFunction() { var x = document.getElementById("myText").value; document.getElementById("demo").innerHTML = x; }