.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Post New Resource Bookmark and Share   

How to USE JavaScript Popup Boxes

Posted By:NATHAN ISRAEL       Posted Date: September 30, 2012    Points: 40    Category:    URL: http://www.dotnetspark.com  

How to USE JavaScript Popup Boxes

<head><title>Sample JS_04 JavaScript Popup Boxes</title>

    <script language="Javascript" type="text/javascript">
            // Popup Boxes
            //(i) alert
                function alertbox()
                    alert("I am Alert Box");
                function confirmbox()
                    var cs = confirm("Do You want TO Continue");
                                document.write("You Selected Ok");
                                document.write("You Selected Cancel");
            function promptbox()
                var x=prompt("Please enter your name");
                        if (x!=null && x!="")
                          document.write("Your Name is:"+ x);
    <form name="popUpBoxes">
    1) ALERT BOX <input type="button" onclick="alertbox()" value="Alert_Box"><br><br>
    2) CONFIRM BOX <input type="button" onclick="confirmbox()" value="Confirm_Box"><br><br>
    3) PROMPT BOX <input type="button" onclick="promptbox()" value="Prompt_Box">



Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend