what is the syntax of event listener in javascript
Answers
Answered by
1
The addEventListener() method allows you to add event listeners on any HTML DOM object such as HTML elements, the HTML document, the window object, or other objects that support events, like the xmlHttpRequest object.
hackxox:
syntax plz
Answered by
2
element.addEventListener("click", myFunction);
function myFunction() {
alert ("Hello World!");
}
PLEASE MARK MY ANSWER AS A BRAINLIEST ANSWER.
function myFunction() {
alert ("Hello World!");
}
PLEASE MARK MY ANSWER AS A BRAINLIEST ANSWER.
Similar questions
Computer Science,
7 months ago
English,
1 year ago