HOWTO: capture onKeyUp on <body>

C

Cartoper

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
 
B

Bart Van der Donck

Cartoper said:
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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top