- Alert dilog box ().
- promot dialog box ().
- confirm dialog box() .
Alert (). An alert dialog box is manely used to give a warning message to the users
alert() is a simple function to display a message
alert("Hii this is r4r");
<html> <body> <script> alert("This is r4r tutorial"); </script> </body> </html>
prompt dialog box ()
The prompt dialog box is very important when you want to pop-up a text box from get user input.
This dialog box has two buttons OK and Cancel button. if user press ok button then its login on the page but when user click on cancel button then its cancel the login page .Syntax :
.prompt ("Enter text " ," Enter default text ");
<head> <script> prompt("r4r is a best tutorial : ", " you are login on r4r totorial"); </script> </head>
confirm dialog box()
confirm ("do you want to cotinue r4r website");
<html> <body> <script> confirm ("do you want to cotinue r4r website"); </script> </body> </html>