views:

234

answers:

5
+3  Q: 

Javascript events

I'm aware of things like "onchange", "onmousedown" and "onmouseup" but is there a good reference somewhere that lists all of them complete with possibly a list of the elements that they cover?

+3  A: 

W3Schools seems to have a good Javascript events reference: http://www.w3schools.com/jsref/jsref_events.asp

yjerem
+1  A: 
Stan
+1  A: 

This Javascript Cheat Sheet has a complete list of of event handlers. Nearly all of them can be used on any html element except for one or two.

If you want to use a lightweight javascript library, DOMAssistant is very lightweight and allows you to add events to elements very easily. Like so:

$("#navigation a").addEvent("click", myFunc);
GateKiller
+7  A: 

Quirksmode has a nice event-compatibility table and an introduction.

doekman
A: 

If you're going to be working with events (setting custom functions and event handlers), then I'd recommend checking out the jQuery library. It makes event binding so much easier than doing it by hand.

travis