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 global variable in javascript?
What are global variables? How are these variable declared and what are the problems associated with using them?
What does “1?+2+4 Evaluate to? What about 5 + 4 + “3??
What do you mean by script?
Is javascript frontend or backend?
What is missing in my code? function numberTally(numList) { var evenTotal = 0; var oddTotal = 0; for (var i = 0; i <= numList.length; i++) { if i % 2 { // i is odd oddTotal += numList[i]; // or oddTotal = oddTotal + numList[i]; } else { // i is even evenTotal + numList[i]; } } alert(oddTotal); return evenTotal; }
What is the difference between the operators '==' and '==='?
How much do javascript programmers make?
How to get the primitive value of a string in Javascript?
What is decodeuri(), encodeuri() in javascript?
How can I learn coding fast?
What does question mark mean in react?
What's the date object using javascript?
How long does it take to get good at javascript?
Explain a story about javascript performance problems?