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
Will javascript be replaced?
What is the use of a boolean object in javascript?
Are there any predefined constant provided by the browser with the key code values that can be reused?
Can I declare a variable as CONSTANT in JavaScript?
What is singleton class in javascript? Explain
Create an array in javascript with a list of 4 colors, assign that array to the variable, ‘colors’.
How can we detect os of the client machine using javascript?
What is a fixed-width table and its advantages?
Explain spread operator in javascript?
List few advantages of using javascript?
What is the role of javascript in html?
Explain the role of deferred scripts in javascript?
What do you mean by script?
What is a prompt box in javascript?
List some features of javascript.