<!DOCTYPE html> <HTML> <HEAD> <script type="text/javascript" src="../js/jquery-3.3.1.js"></script> <TITLE>ly</TITLE> </HEAD> <script> function show(data){ alert(data.data); } $(document).ready(function () { $("#one").bind("click",'one',show); }) </script> <body> <button id="one">1</button> <button id="two" οnclick="show({data:'two'})">2</button> </body> </HTML>