Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to display Alert in JavaScript

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


Please Help Members By Posting Answers For Below Questions

What is console.log()?

913


how do you declare variables in javascript?

963


What is a method in javascript?

958


How to use one javascript function for multiple input fields?

1984


What is the purpose of using javascript?

904


What is the difference between attributes and property?

969


How to handle event handlers?

953


How to change the background color of HTML document using JavaScript?

869


How to read elements of an array in JavaScript?

1047


How to validate a form in javascript?

901


What boolean operators can be used in JavaScript?

948


What are the pop-up boxes available in javascript?

923


What does trim stand for?

908


Where should I put script tags?

829


What value does prompt() return if the user clicked the cancel button?

830