Morden Javascript Tutorial Chapter 2 - Fundamentals: 06~10
2.6 Interaction: alert, prompt, confirm Will introduce alert, prompt and confirm in this chapter. alert It shows a message and waits for the user to press “OK”. alert("Hello"); prompt This function prompt accepts two arguments result = prompt(title, [default]); It shows a modal window with a text message, an input field for the visitor, and the buttons OK/Cancel. title: The text to show the visitor. default: An optional second parameter, the initial value for the input field. ...