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...


Event handler Example



Event handler Example..

Answer / hrpatelsoft@gmail.com

<html>
<head>
<title>DOM!!!</title>
</head>
<body>
<input type="button" id="btnClick" value="Click Me!!" />
<script type="text/javascript">
document.getElementById("btnClick").addEventListener("click", clicked);
function clicked()
{
alert("You clicked me!!!");
}
</script>
</body>
</html>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

What is the disadvantage of javascript?

0 Answers  


Can you assign an anonymous function to a variable and pass it as an argument to another function?

0 Answers  


Write the point of difference between web-garden and a web-farm?

0 Answers  


What is closure?

0 Answers  


What is the output of 10+20+”30″ in JavaScript?

0 Answers  


What is the Difference between HTML and DHTML

15 Answers   TCS,


List some features of javascript.

1 Answers  


Explain the unshift() method ?

0 Answers  


Explain window.onload and ondocumentready?

0 Answers  


What is Javascript namespacing? How and where is it used?

0 Answers  


What do you mean by ide?

0 Answers  


Why do we need to declare variables?

0 Answers  


Categories