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 will happen if an infinite while loop is run in Javascript?
What is double exclamation point?
How can we establish connection with java and sql server?
What is variable typing?
What close() does in javascript?
What is console.log() and why it is used?
What is an object in javascript, give an example?
What are ‘settimeout()’?
What is the difference between undeclared & undefined?
What is the javascript function?
How to find operating system in the client machine using javascript?
Event handler Example