How to display Alert in JavaScript



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

Post New Answer

More JavaScript Interview Questions

What is a function object?

0 Answers  


Is a hash table an array?

0 Answers  


What is new keyword in javascript?

0 Answers  


Is javascript insecure?

0 Answers  


I need project details about WEB CONTENT FILTERING USING NEURAL NETWORKS and how to explain it....plz help me in this topic.....

0 Answers  






What is the difference between the keywords var and let?

0 Answers  


How do you reverse a string in javascript?

0 Answers  


Which company developed JavaScript?

0 Answers  


How to create multiline strings in javascript?

0 Answers  


What is the disadvantage of javascript?

0 Answers  


Which keyword is used to print the text in the screen?

0 Answers  


What is unescape() function?

0 Answers  


Categories