mwhite14
mwhite14

Reputation: 257

Using Keyup Event Globally

How would I go about using JavaScript on my web page page to call a function anytime there is a keyup event globally, so it isn't attached to textbox. I need it to work for every key on the keyboard. I am very new to JavaScript and having a lot of trouble interpreting the documentation

Upvotes: 6

Views: 3151

Answers (1)

Steven Lu
Steven Lu

Reputation: 2180

jQuery

$(document).keyup(function() {});

Javascript

document.onkeyup = function(event) {}

Upvotes: 7

Related Questions