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 use of a number object in javascript?

0 Answers  


Does javascript care about whitespace?

0 Answers  


How can you set position of the page (top and left) to 0 using javascript in one line code?

0 Answers  


How do I use javascript to password-protect my web site?

0 Answers  


How long does it take to learn coding?

0 Answers  


What is null in javascript?

0 Answers  


Explain unescape() and escape() in javascript?

0 Answers  


How to validate email in javascript?

0 Answers  


What is a “closure” in JavaScript? Provide an example

1 Answers  


What does three dots mean in texting?

0 Answers  


Is javascript safe to download?

0 Answers  


Can you access Cookie using javascript?

0 Answers  


Categories