Javascript examples for jQuery:Mouse Event
Call my function from JQUERY on click and pass in data
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-compat-git.js"></script> <script type="text/javascript"> $(window).on('load', function() { $("input").on('click', {name: 'me'}, func); function func(event) {//w ww . j a v a 2s . c o m console.log(event.data.name); } }); </script> </head> <body> <input type="button"> </body> </html>