‘confirm’
box is used to get confirmation from user. If user Press OK, then it return
true, else false.
Syntax
data =
confirm(text);
confirm.html
<!DOCTYPE html> <html> <head> <title>confirm box</title> </head> <body> <script type="text/javascript"> var data = confirm("Are you above 18Yrs ?"); document.write("You Entered " + data); </script> </body> </html>
No comments:
Post a Comment