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 are the distinct types of error name values?
How typeof operator works?
1) How can we use java script in testing the application? 2) What all the things(Software application - like browser, notepad) we need to learn Jscript?
What is an onclick?
What's the Difference Between Class and Prototypal Inheritance?
Explain the process of document loading.
What does question mark mean in react?
How do I retrieve a cookie with a given name using a regular expression?
How do I use an external javascript file?
why can't we call a static method from a non-static method
What are exports & imports?
What can javascript programs do?