5

How would I go about using JavaScript on my webpage 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

4

1 回答 1

5

jQuery

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

Javascript

document.onkeyup = function(event) {}
于 2012-07-05T14:55:45.713 回答