How to display Alert in JavaScript
Answer / 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 |
What are the characteristics of javascript ‘strict mode’?
How do I get javascript?
What are the different ways to create an array in javascript?
what is flux in javascript?
How do you target a specific frame from a hyperlink in javascript?
What is a closure javascript? Explain
How javascript variables work?
How can you identify a function?
What is the difference between ‘let’ and ‘const’?
How to set the cursor to wait in JavaScript?
Which built-in method returns the calling string value converted to upper case?
program showing string concatenation?