Display Confirmation box using JavaScript
In the Conformation Box, one box will appear and ask for conformation like “OK” and “Cancel” option.
<!DOCTYPE html> <html> <head> </head> <body> <p>Display Confirmation Box using JavaScript</p> <button onclick="showConformationMessage()" id=btnClick>Click here to check your account is created or not </button> <script type="text/javascript"> function showConformationMessage(){ var name = confirm("Are you want to use the account"); if (name == true){ alert(" Account created sucessfully"); } else{ alert("sorry,try again Your account is not created"); } } </script> </body> </html>
Output:-
“Are you want to use the account”. We can click on “Ok” or “Cancel”
Hello! Someone in my Facebook group shared this website with us,
so I came to give it a look. I’m enjoying the information. I’m bookmarking and will be tweeting
this to my followers! Wonderful blog and amazing design and style.