Think about it this way, Jonathan, and event handler is a special kind of functions that "listens" for events (click, mouse over, etc). When an event occurs, you the programmer want your program to "do something". Doing something means calling a function. That's why you pass a function to the event handler - to tell it what to do when the event occurs.
Think about it this way, Jonathan, and event handler is a special kind of functions that "listens" for events (click, mouse over, etc). When an event occurs, you the programmer want your program to "do something". Doing something means calling a function. That's why you pass a function to the event handler - to tell it what to do when the event occurs.
ReplyDelete