Dashboard Temp Share Shortlinks Frames API

HTMLify

Condition
Views: 636 | Author: djdj
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>If-Else Condition</title>
        <style>
            body{
                color:red;
                text-align:center;
            }
        </style>
    </head>
    <body>
        <h1>Hey Guys, How are you!!</h1>
        <script>
            var tam = prompt("Write any number");
            if (tam > 0){
                alert("You Enter positve number " + tam);
            }
            else if (tam == 0){
                alert("It is Zero");
            }
            else if(tam<0){
                alert(`You Enter Negative Number ${tam}`);
            }
            else{
                alert("Error");
            }
        </script>
    </body>
</html>