Inline events

Explorer 3 on Mac doesn't support events at all.

My test page doesn't yet work in Konqueror, so I can't yet offer Konqueror info.

This is the compatibility table for inline events, that is, events that are handled inside a tag.

This page has been superseded by the new Events compatibility page. It is only maintained for historical reasons.

Examples:

<A HREF="#" onMouseOver="omo()">
<TEXTAREA onKeyUp="checkItAll()">
<P onDblClick="anotherFunction()">

Notes:

EventHTML Element NN2IE3Op3NN3Op4Op5NN4IE4IE5NN6iCabWebTV
Abort On <IMG> NoYesNo YesNo
Blur
Focus
On form fields Partial
(Blur: Only for NN2 Mac)
Yes
(Mac: Partial)
PartialYes
(V4 Mac & NN4 Linux: Partial)
PartialYes
On <BODY> NoYes
(Mac: No)
NoYes
(Mac: No except for iCab)
Impossible
Note for Netscape 6: The good old onBlur="self.focus()" in a popup crashes my Netscape 6.01 horribly, while the reverse onFocus="self.blur()" does nothing.
Click On <A>Yes
On form fields PartialYesPartial
On <P> NoYesNo YesNo
ChangeOn form fields PartialYes
Dblclick On <A> NoYes
(NN4 Linux: No)
No
On <P> NoYesNo
Error
(note)
On <IMG> NoYesNoYes
On <BODY> No
(NN4 Linux: Yes)
YesNo
KeyDown
KeyPress
KeyUp
On text fields and textareas No Not KeyUp Yes
(IE4 Mac: Only KeyPress
iCab: KeyUp fires onKeyDown!)
Note for Netscape 4: If you do document.captureEvents(Event.KEYPRESS | etc) the inline events won't work!
LoadOn <BODY> Yes
EventHTML Element NN2IE3Op3NN3Op4Op5NN4IE4IE5NN6iCabWebTV
MouseDown
MouseUp
On <A> No YesNo
On <P> NoYesNoYes Not MouseUpNo
MouseMoveOn <A> or <P> NoYesNo Yes
(IE4 Mac: No)
No
MouseOut
MouseOver
On <A> MouseOver,
not MouseOut
Yes
On <P> NoYesNo YesNo
ResetOn <FORM> NoYesNo Yes
ResizeOn <BODY> NoYes
(V4 Mac: No)
NoImpossible
SelectOn text field and textarea NoYesNo
SubmitOn <FORM> Yes
UnloadOn <BODY> No
(Mac: Yes)
Yes NoYesNo
EventHTML Element NN2IE3Op3NN3Op4Op5NN4IE4IE5NN6iCabWebTV

if you notice a mistake in this table, please tell me.

onError

Few people will know that the onError event handler also exists for an <IMG>. When you do

<IMG SRC="whatever.gif" onError="doSomething()">

the script doSomething() is executed if whatever.gif (the SRC) is not found on the server. This can sometimes be very useful.

Even more to my surprise, Netscape 4 on Linux and Netscape 6 allow an onError event handler on the BODY tag, firing whenever a JavaScript error occurs.

Home