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

How to find operating system in the client machine using javascript?

0 Answers  


What do you understand by this keyword in javascript?

0 Answers  


What does break and continue statements do in javascript?

0 Answers  


How to write html code dynamically using JavaScript?

0 Answers  


What is enum data type?

0 Answers  


What is difference == and === in javascript?

0 Answers  


What are the ways of making comments in javascript?

0 Answers  


How do you implement Ajax using hide() function in JQuery?

2 Answers   QuinStreet,


How to define a anonymous function?

0 Answers  


What is the use of a weakset object in javascript?

0 Answers  


What are self Executing Functions?

0 Answers  


Which built-in method returns the length of the string?

0 Answers  


Categories