how to detect an F5 refresh keypress event in jquery?

Posted by chaonextdoor on Stack Overflow See other posts from Stack Overflow or by chaonextdoor
Published on 2012-12-14T04:51:55Z Indexed on 2012/12/14 5:03 UTC
Read the original article Hit count: 117

Filed under:
|
|

I noticed that jquery has a keypress function. But it seems that it can only detect keypress event of numbers and characters. It cannot detect the F5 keypress event. And What surprises me the most is everyone online says that the keyCode of F5 is 116, But when I use the jquery keypress function, it just shows that the character t has the keyCode of 116(it seems that 116 is the ascii code of lowercase t)! Can somebody give me any idea about this and how to detect the F5 event in javascript or jquery? Thanks so much in advance.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery