Prompt ,alert confirm in javascript

technical talkiess
0

 Prompt ,alert confirm in javascript :- 


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Prompt,confirm , alert</title>

</head>

<body>

    <div class="container">

        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut, tempore nesciunt! Magni?</p>

    </div>

</body>

<script>

    // user ko kuch message dikhane ke liye use karte hai hamm isko .... aur ye koi value return nahi karta hai

    // alert("Test")


    // promopt : user se kuch puchna hai to ap iska use kar sakte hai .... te enter value ko return karta hai

    // guest iski default value hai

    // let name = prompt("Enter your name please ?","Guest");

    // alert(name);


    // confirm .... iska use ham user se confirmation ke liye use karte hai


    // let delteAccount = confirm("Are you sure to delete the post ? ");

    // alert(delteAccount);


    let age = prompt("Please enter your age",18);


    if(age > 18){

        alert("You are allow in the club");

    }else{

        alert("You are not allow in the club")

    }

</script>

</html>
Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)