Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. document.onkeydown = fkey;
  2. document.onkeypress = fkey
  3. document.onkeyup = fkey;
  4.  
  5. var foiPressionado = false;
  6.  
  7. function fkey(e){
  8. e = e || window.event;
  9. if( foiPressionado ) return;
  10.  
  11. if (e.keyCode == 116) {
  12. alert("F5 pressionado");
  13. foiPressionado = true;
  14. }else {
  15. alert("Proibido");
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement