Javascript examples for DOM:Event
Using addEventListener for Two Functions
<html> <head></head> <body> <div id="myElement"> Please click here./*from w w w . ja v a 2 s . c o m*/ </div> <script> function func0() { console.log("Function0 is called"); } function func1() { console.log("Function1 is called"); } document.getElementById("myElement").addEventListener("click", func0, true); document.getElementById("myElement").addEventListener("click", func1, true); </script> </body> </html>