Question

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?

Was it helpful?

Solution

W3Schools seems to have a good Javascript events reference: HTML DOM Events

OTHER TIPS

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

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);

Here is a pretty good JavaScript event reference with the elements they are for:
JavaScript Tutorial >> JavaScript Events

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top