India's First Software Developer Community

Popup Box (Prompt Box)

Learn 3 rd Popup Box of Javascript,
    In last video We learn about alert and confirm popup box
    Now Its Time to learn About Third Type Popup Box

    3) PROMPT BOX    

     Prompt Box Plays very Important Role To get Information From User

<!DOCTYPE html>
<title>Popup Box in Javascript | W3CodeIndia</title>
function newfunction()
    var txt;
    var person=prompt("Please Enter Your Name :", "W3CodeIndia");
    if(person==null || person=="")
        txt="User Cancelled the Prompt.";
        txt="hello"+person+", Welcome To W3CodeIndia !";
<center><h1>Popup Box In Javascript Part Two</h1></center>
<center><button onClick="newfunction()">Prompt Box</button></center>
<center><p id="demo"></p></center>

Subscribe Us :

Chapters :-