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
What is strict mode in javascript?
How can I prevent others from reading/stealing my scripts or images?
What are escape characters?
How do you check if a variable is an object
How to define a anonymous function?
Can array in javascript be extended?
Explain typecasting in javascript?
What are JavaScript Cookies?
How to use strings as array indexes using javascript?
Is notepad ++ an ide?
Why javascript is called as script for all browsers?
What kind of conditional statements does JavaScript support?
What is the disadvantage of javascript?
How to convert a string to a number using javascript?
Why javascript is called lightweight language?