Arrow keys and onkeypress

Discussion in 'Javascript' started by pazabo, Mar 25, 2007.

  1. pazabo

    pazabo Guest


    Does anybody know why doesn't onkeypress catch up/down arrow keys
    while it catches left/right arrows? My only supposition is that up/
    down keys are used for moving between form elements, anyway does
    anybody know any solution to this problem?

    pazabo, Mar 25, 2007
    1. Advertisements

  2. pazabo

    Evertjan. Guest

    pazabo wrote on 25 mrt 2007 in comp.lang.javascript:
    The why is impossible to answr since, in IE7 at least,
    not one of the arrow keys returns anything:

    Try IE:

    <body onkeypress='this.innerHTML=event.keyCode'>
    Evertjan., Mar 25, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.