20.2.2Using a Brush
script tag, (2) into a method that will be automatically evaluated when the page has completely loaded, (3) to a DOM element, or (4) as an event handler to a DOM element.
1. Adding to a script tag. You can add the brush right at the current place into the XHTML output stream. This is done by creating a script tag using an expression such as
2. Adding to a list of load-scripts. You can add the brush to a list of load scripts. These load scripts will be evaluated after the page has finished loading. This solution is usually preferred over the previous one. The following expression is an example:
The most common events are
onchange. For example,
onchange event will never be triggered on a div tag, since it only applies to form elements that can be changed. The support and handling of some of the events (foremost among these are
onunload) differ significantly among the web browser implementations.