Javascript examples for jQuery:Form Button
Executing PHP with HTML Button using jQuery
<html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script> </head> <body> <button id="btnTest">Click</button> <script> $(document).ready(function () { $('#btnTest').click(function () { $.ajax({/*from www . j ava 2 s . c om*/ type: "POST", url: 'ajax.php', data:{action:'call_this'}, success:function(html) { console.log(html); } }); })}); </script> </body> </html>