Sunday 27 March 2016

Write a JavaScript program to show the Alert Box?

Code:


<!DOCTYPE html>
<html>
<body>
<p>Click the button to display an alert box</p>
<button onclick="myfunction()">
Try it
</button>
<script>
function myfunction()
{
alert("I am an alert box!");
}
</script>
</body>
</html>

Output:



No comments:

Post a Comment