0
Return value of prompt function
Does it return the value of input data or a boolean value whether it is stored or not.(as OK and Cancel)
2 ответов
0
I Didn't Really Understand The Question,But I Think You're Talking About Getting The Input From The Prompt Box.
All You Have To Do Is Just Store The prompt() Function In A Variable:
var prompt_window=prompt("What's Your Name?","");
Then Use That Variable However You Like To Get The Input.
0
For Prompt(), if the user hits OK the input value is returned. If the users hits Cancel, null is returned. Reference: http://www.w3schools.com/jsref/met_win_prompt.asp