Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Function Alert,confirm,prompt

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">Try it</button>


<script>
function myFunction() {
    var name = prompt("Please enter your name", "XYZ");

    if (name != null) {
       alert('Your name is ' + name )


    }
}
</script>

</body>
</html>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Function
ADD COMMENT
Topic
Name
9+6 =