Handle click event on image - Javascript jQuery

Javascript examples for jQuery:Mouse Event

Description

Handle click event on image

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.9.1.js"></script> 
      <script type="text/javascript">
function plusButton_Click() {/*from w w  w  .j a  va  2 s.co  m*/
    console.log('hi');
}

      </script> 
   </head> 
   <body> 
      <img src="http://www.java2s.com/style/download.png" onclick="plusButton_Click()">  
   </body>
</html>

Related Tutorials