how to take input value in javascript from html code example Example: js input value var x = document.getElementById("myText").value;