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 are the distinct types of error name values?

0 Answers  


How typeof operator works?

0 Answers  


1) How can we use java script in testing the application? 2) What all the things(Software application - like browser, notepad) we need to learn Jscript?

1 Answers  


What is an onclick?

0 Answers  


What's the Difference Between Class and Prototypal Inheritance?

0 Answers  


Explain the process of document loading.

0 Answers  


What does question mark mean in react?

0 Answers  


How do I retrieve a cookie with a given name using a regular expression?

0 Answers  


How do I use an external javascript file?

0 Answers  


why can't we call a static method from a non-static method

0 Answers  


What are exports & imports?

0 Answers  


What can javascript programs do?

1 Answers  


Categories