0

Can a tag have multiple event attributes at once?

For example: <button onClick = "calc();" onClick = document.write("Hey there!");>click me</button>

2nd Jun 2020, 6:45 PM
Xavier K Muneku 🇿🇲
Xavier K Muneku 🇿🇲 - avatar
1 ответ
+ 2
For multiple events on the same element has to be used element.addEventListener("click", myFunction); element.addEventListener("touchend", clearing); element.addEventListener("click", calc);
2nd Jun 2020, 6:56 PM
JaScript
JaScript - avatar