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 |
How can you to add javascript to a page when performing an asynchronous postback?
Name some of the ways in which Type Conversion is possible?
What is the purpose of 'this' operator in JavaScript?
Is javascript enabled on chrome?
What is the difference between an Anonymous Function and a named function?
Describe the properties of an anonymous function in JavaScript?
How to get value from a textbox?
What are disadvantages of using javascript?
What is an empty html tag?
Can any one tell me how Java is purely an Oops language
What is eval() in javascript?
What is npm repository?