There are two basic accepted way to fire a function using a dynamic event handler:
obj.onclick = handler_function;
- No parameters are allowed in this method
- Previous assignment of the event will be overwritten.
other statements here
- Used for multiple function firing or for firing a function with one or more parameters
- Previous assignment for the event will be overwritten
- Simple way to register multiple event handlers for the same event on one element.
- Does not overwrite the previous assignments
The newly attached functions will be called in the sequence their of attachment
No comments yet.