function is an attribute of action.
The function attribute specifies the name of the JavaScript function associated to this action.
See action page for a detailed description.