The JavaScript dialog

A, alert ()

    Syntax :

alert("hello javascript");

  This dialog is a pop-up message.

  The effect of the Chrome browser.

  

二、prompt()

  Syntax :

var userName = prompt ( 'Enter your name', 'JavaScript');

  This dialog is a pop-up dialog box allows users to enter information, you can accept the value entered by the user via a variable.

  Chrome browser effects:

三、confirm()

  Syntax:

 var isSure = confirm ( 'Do you want to delete the data?');

    The pop-up a dialog for the user to select the "OK / Cancel" selection box, a variable can accept the value, determined as true; canceling is false.

  Chrome browser effects:

 

  Note : The above three dialog boxes are provided to the system, but rendered in a browser every effect we use are different, so we do not advocate use.

 

Guess you like

Origin www.cnblogs.com/niujifei/p/11441689.html