Tim Huegdon uses JavaScript to fix Safari's bug where clicking on a label doesn't set focus to the corresponding field element (a useful accessibility aid). Using YUI and event delegation Tim walks us through the development of this piece of code involving attaching an event listener, getting the target of an event, then finding the field that corresponds to the label, and focusing on it if its a text field, or activating / selecting the form element if its a radio button or checkbox.
Christian Heilmann's excellent guide to writing unobtrusive JavaScript. Takes the reader from the inline JavaScript world right through to a clean dynamically attached events with all the JavaScript code in external files. Covers DOM Scripting. This is the key reference to unobtrusive scripting.