JavaScript add variable

PHOTO EMBED

Tue Apr 13 2021 13:40:17 GMT+0000 (UTC)

Saved by @pradeeproy460 #html

<! DOCTYPE html>

<html>
<head>
    <title>Prompt Dialog Box</title>
</head>
<body>
    <script>
        var name=prompt("Please enter your name: ","Welcome");
        if(name == null || name == ""){
            alert("You have not enter your name!");
        }
        else{
            alert("Hello, "+name);
            document.write("Now its : " + Date());
        }
    </script>
</body>
</html>
content_copyCOPY