Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 callback?

0 Answers  


What is object freeze?

0 Answers  


Is javascript server side or client side?

0 Answers  


What boolean operators does JavaScript support?

5 Answers   Aptech, HCL, Satyam,


What is JavaScript?

0 Answers  






What is local and global scope?

0 Answers  


How to modify the url of the page without reloading the page?

0 Answers  


Which javascript is best?

0 Answers  


What are the requirements of web application using javascript?

0 Answers  


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

0 Answers  


What does the "Access is Denied" IE error mean?

0 Answers  


Describe javascript and vbscript.

0 Answers  


Categories