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 |
How much time it will take to learn javascript?
In a java script, what is the difference between "==" and "===" operator?
Is javascript default scripting language?
What is viewstate in javascript?
What are a fixed-width table and its advantages in javascript?
Explain the for-in loop?
What is called variable?
How is it possible to get the total number of arguments that are passed to a function?
What are exports and imports?
Why is javascript dangerous?
List different ways of empty an array in javascript?
What are ‘settimeout()’?