I am using the keyup
event of jQuery. It is working fine with all keys except F5.
Here is the code:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(document).keyup(function(e){
alert(e.keyCode); // This is not working always when we press F5
});
});
</script>
</head>
</html>
I am getting alert on pressing all keys but it is not working fine with F5. Sometimes alert is fired with F5 and sometimes not. I have tried this on Chrome as well as Firefox.