views:

49

answers:

1

Can someone explain what is the proper way to make certain actions call functions in javascript? Should I use event handlers like onclick="callFunction();"? Or should I use an event listener? If yes, how do they work?