Javascript examples for jQuery:Form Submit
Jquery form submission to post to php
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $('document').ready(function(){ $('#submit1').on('click',function(){ $.post('cart.php',{email:'email',pkgname:'pkgname'}).then(function(){ $('form').submit(); });//from www .j av a 2 s . c o m }); }); </script> </head> <body> <form action="cart.php" method="post"> <input type="button" id="submit1" value="submit"> </form> </body> </html>