Javascript examples for jQuery:Mouse Event
Click to update element
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script> $(document).ready(function(){ $('#target').click(function() { $('#output').html(function(i, val) { return val*1+1 }); });// w w w.j a v a 2s .c o m }); </script> </head> <body> <button id="target" type="button">Click Me</button> <div id="output"> 10 </div> </body> </html>