Asp.NET,PHP,JAVA,JavaScript & HTML Questions and Answers
You can write your records by the help of this blog...
Pages
Home
ASP.NET
PHP
HTML
JavaScript
JAVA
HTML Tags
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment