以下这几个链接比较全面的介绍了各种监听JavaScript事件的方法:
Early event handlers (Inline mode):
http://www.quirksmode.org/js/events_early.html
Traditional event registration model:
http://www.quirksmode.org/js/events_tradmod.html
Advanced event registration models:
http://www.quirksmode.org/js/events_advanced.html
Object-Oriented Event Listening through Partial Application in JavaScript:
http://www.blogjava.net/fantasy/archive/2006/04/26/43395.html
自己遇到的一个问题:
当采用element.onclick = function(event) { ... };的形式时,IE浏览器中函数内部无法正确得到event对象。
解决办法:
在函数内以event || window.event代替event。
Another article about writing JavaScript: "Separating behavior and structure" (http://www.digital-web.com/articles/separating_behavior_and_structure_2/).
补充:
事件(for all events or just onclick?)的属性列表和说明:
http://www.devguru.com/technologies/ecmascript/QuickRef/evhan_onclick.html