0
Can a tag have multiple event attributes at once?
For example: <button onClick = "calc();" onClick = document.write("Hey there!");>click me</button>
2 Réponses
+ 2
For multiple events on the same element has to be used
element.addEventListener("click", myFunction);
element.addEventListener("touchend", clearing);
element.addEventListener("click", calc);