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 |
Explain “use strict” ?
How javascript variables work?
What is the use of decodeuri() and encodeuri()?
What is difference between module.exports and export?
What is whitespace in javascript?
Can we learn javascript without knowing java?
What is the similarity between the 1st and 2nd statement?
How do I run javascript on my iphone?
What is rest parameters in javascript?
What is createtextnode?
What is the use of spread operator?
What is noscript tag?