Answer Posted / 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 View All Answers
How can you declare a class in javascript?
What is difference == and === in javascript?
How can javascript language be separated from objects?
Does javascript support foreach loop?
What typeof returns for a null value?
Where do I put javascript code in html?
List html dom mouse events?
what are the differences between as2 and as3?
Is javascript becoming obsolete?
Entire content of a JavaScript source file in a function block?
How to hide javascript code from old browsers that dont run it?