HOWTO: capture onKeyUp on <body>

Discussion in 'Javascript' started by Cartoper, Oct 30, 2007.

  1. Cartoper

    Cartoper Guest

    Is it possible to capture onKeyUp for a whole page? If so, how? I
    tried adding the onKeyUp to the body element and it never is called.

    Cartoper
    Cartoper, Oct 30, 2007
    #1
    1. Advertising

  2. Cartoper wrote:

    > Is it possible to capture onKeyUp for a whole page? If so, how? I
    > tried adding the onKeyUp to the body element and it never is called.


    I'm not sure how your code looks like, but

    <body onKeyUp="alert('you pressed a key');">

    should do the trick.

    --
    Bart
    Bart Van der Donck, Oct 30, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad
    Replies:
    3
    Views:
    15,685
  2. Jay

    Auto tab in Datagrid onKeyUp

    Jay, Aug 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    588
  3. mc
    Replies:
    2
    Views:
    1,105
  4. Jay

    Auto tab in Datagrid onKeyUp

    Jay, Aug 10, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    167
  5. Jake Barnes
    Replies:
    7
    Views:
    184
    Thomas 'PointedEars' Lahn
    Jan 11, 2008
Loading...

Share This Page