handle event for right mouse button clicked - Javascript jQuery

Javascript examples for jQuery:Form Button

Description

handle event for right mouse button clicked

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.8.3.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//from  www  .j  a va  2 s  .  c  om
$('a').on('contextmenu', function(e){
    window.location = this.href;
    return false;
});
    });

      </script> 
 </head> 
 <body> 
  <a href="http://java2s.com">click</a>  
 </body>
</html>

Related Tutorials