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 array in javascript?
If we want to return the character from a specific index which method is used?
How to get an element by class in javascript ?
Where do I put javascript code in html?
What does undefined value mean in javascript?
Do you need to declare variables in javascript?
What does ecma stand for?
How to open a window with no toolbar, but with the location object?
What is the difference between HTMLCollection and NodeList?
How to create a cookie using javascript?
Explain how to read and write a file using javascript?
What is a null variable?
What is event in javascript?
In which location cookies are stored on the hard disk?
What are the four types of javascript objects?