Getting keycode from keypress event

Giganews Newsgroups
Subject: Getting keycode from keypress event
Posted by:  yzzzzz (yzzz…@netcourrier.com)
Date: Sun, 13 Jul 2003

Hi

I have:
<div onkeypress="go(event)">...</div>
and:

function go(event) {
    alert(event.keyCode);
}

but I always get 0 for the keycode.

I am using Mozilla.
Thank you for your help.

Replies