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 |
What is the disadvantage of javascript?
Can you assign an anonymous function to a variable and pass it as an argument to another function?
Write the point of difference between web-garden and a web-farm?
What is closure?
What is the output of 10+20+”30″ in JavaScript?
What is the Difference between HTML and DHTML
List some features of javascript.
Explain the unshift() method ?
Explain window.onload and ondocumentready?
What is Javascript namespacing? How and where is it used?
What do you mean by ide?
Why do we need to declare variables?