Java script dialog boxes
java script provides the ability to user into display small amount of text, to the user by using dialog boxes.These dialog boxes appear as separate win down and they contain defines on the information provided by the users.There are three types of dialog boxes provided by the java script.
1.alert dialog box
2.prompt dialog box
3.confirm dialog box
The alert dialog box:
1.A message is displayed is the user when in correct information is keyed in a form.
2.An in valued is the output of a calculation.
3.A warning that a service is nit available on a given date or time
syntax:
Alert("message");
Example:
Alert("welcome");
prompt dialog box:
1.Displayed a predefined message.
2.Displayed the OK and the cancel button.
syntax:
prompt("message","default values");
Example:
prompt("enter the favourite color","green");
confirm dialog box:
1.A predefined message
2 .OK and cancel button
syntax:
confirm();
Example:
confirm("press a button");
0 Comments