Knowledge Walls
Laya
Hyderabad, Andhra Pradesh, India
window.prompt() Method in Window Object of Javascript Syntax with Examples
2400 Views
Usage 
Prompt method is used to display dialog box which is used to get input from user before getting inside into the screen.
Syntax 
prompt("message");
Example
var display=prompt("Enter Your name");
document.write("Welcome, "+ display);
Output 
Pop up message will come to get input for user and then display below message.

"Welcome, vidhyaa"
Best Lessons of "Javascript Syntax with Examples"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details