Answer Posted / veerahema
<!DOCTYPE html>
<html>
<body>
<h1>The Window Object</h1>
<h2>The alert() Method</h2>
<p>Click the button to display an alert box.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
alert("Hello! I am an alert box!");
}
</script>
</body>
</html>
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is use of JavaScript and jquery?
How do I open javascript?
Which companies are using node js?
Difference between window.onload and onDocumentReady?
What is scope variable in javascript?
Should I learn java first or javascript?
How to check if a variable is an integer in javascript ?
What is noscript tag?
Why it is not advised to use innerhtml in javascript?
What does clean white space mean?
What does 3+4+"7" evaluate to?
What's the difference methods get and post in html forms?
Explain the working of timers in javascript?
How to add buttons in javascript?
What does javascript do?