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 |
Can you pass a anonymous function as an argument to another function?
Define unescape() and escape() functions?
What is this? Var myarray = [[[]]];
Explain function hoisting in javascript?
What are undefined and undeclared variables?
How can I learn coding fast?
Can we create session in javascript?
What is lazy loading in javascript?
Can I write javascript in notepad?
How do I start a javascript project?
Explain the terms synchronous and asynchronous code?
What is the difference between write and writeln in javascript?