onkeypress:
- which (i.e. e.which)
- keyCode (i.e. e.keyCode)
<script>
function testkeydown(e)
{
alert("Key pressed was " + e.keyCode);
}
function testkeyup(e)
{
testkeydown(e);
}
function testkeypress(str, e)
{
alert("Key pressed was " + e.which + " and the additional parameter was " + str + ".");
}
</script>
<input type="text" onkeydown="testkeydown(event);" />
<input type="text" onkeyup="testkeyup(event);" />
<input type="text" onkeypress="testkeypress("additional parameter", event);" />