Handle click event for anchor - Javascript jQuery

Javascript examples for jQuery:Mouse Event

Description

Handle click event for anchor

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.3.min.js"></script> 
   </head> 
   <body> 
      <a id="prevlink" href="#">test</a> 
      <script type="text/javascript">
$('#prevlink').click(function () {
    console.log("Test");
});// ww  w  .j  av a  2s  . co m

      </script>  
   </body>
</html>

Related Tutorials