24

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?

4

5 回答 5

11

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

于 2008-08-09T06:42:20.003 回答
11

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

于 2008-08-09T08:29:10.880 回答
4

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

于 2008-08-09T07:00:44.163 回答
4

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);
于 2008-08-09T07:49:41.023 回答
2

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.

于 2008-08-15T16:03:06.063 回答