+ 1

How do I get user input

I need to know how to get user input for a web document using java script

23rd Feb 2018, 9:07 PM
Lhfhv
2 Answers
+ 3
var user=prompt("enter your name") alert(user)
23rd Feb 2018, 9:12 PM
Sudarshan Rai
Sudarshan Rai - avatar
0
var user = document.getElementById(“ ”).value; Between signs place your input’s ID
23rd Feb 2018, 10:17 PM
Yaroslav Developer