0
How to get the input from the user in JavaScript
2 Answers
+ 3
Prompt() second parameters isn't for title, but for default value ^^
Anyway, this is the easiest way, but the worst also, as it isn't user friendly at all...
The right way, is to not be too much lazy, and write at least minimalistic html with an <input type="text">, from where you get the user entry by accessing its 'value' attribute... and eventually an <input type="button"> to call the fuction requiering the user entry ;)
0
var user_name = prompt("Enter your name: ")