Disable f3 search - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:keydown

Description

Disable f3 search

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.js"></script> 
  <script type="text/javascript">
    $(function(){//from  www.j ava 2  s  .c om
    $('#command').keydown(function(e) {
        if(e.which === 114) {
             return false;
        }
    });
    $('#command').keyup(function(e) {
        if(e.which === 114) {
             history.go(-1);
        }
    });
    });

      </script> 
 </head> 
 <body> 
  <input type="text" id="command">  
 </body>
</html>

Related Tutorials