Saturday, 1 August 2020

Window confirm() Method In JavaScript

8/01/2020 - By Pranav Singh 0

In this article i will show you how how you can show user Window confirm() Method method to show an alert message for confirmation of the user in your web application using javascript.


So here is the code:

    <script>

        function ConfirmFunction() {

            var status = confirm("Please press Ok to confirm you selection.");

            if (status == true) {

                alert("You clicked OK");

            } else {

                alert("You pressed Cancel!");

            }

        }

    </script>


 Now create an html button tag.

  <input type="button" value="Click For Confirm Button"  onclick="javascript: ConfirmFunction();"/>




Now click on button

 As per button selection you will get message....







Tags:
About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Global Classified : Connectseekers.com
© 2014 aspdotnet-pools.com Designed by Bloggertheme9.
back to top