rewriting event handlers

admin

Administrator
Staff member
What would be another way to write this (that would work)?

"object.onclick = someFunction(parameters);"

Since I know you can't write it like that, but I don't know why event handlers have to be of form

"object.onclick = someOtherFunctionWithoutParametersOrParens;"
 
Back
Top