Change Javascript Variables Using <input>

45 views Asked by At

Title says it all. Is there any way of changing javascript variables using the html tag?

1

There are 1 answers

1
Gregory Wullimann On BEST ANSWER
var variable = document.getElementById("id").value

Your <input> should have an id, but there are different ways to get an element with javascript.

You should read a nice tutorial about javascript and HTML to get the basic knowledge.