Posted By

khaled__mahmoud on 05/01/13


Tagged

form ajax post


Versions (?)

Post form by AJAX and jQuery


 / Published in: jQuery
 

This code shows how we post HTML form by AJAX and jQuery.

  1. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
  2. <script>
  3. $(document).ready(function () {
  4. $("#Form1").submit(function (Event) {
  5. Event.preventDefault()
  6. $.post(
  7. "Insert.php",
  8. $(this).serialize(),
  9. function (Data) {
  10. // Success
  11. }
  12. )
  13. })
  14. })
  15. </script>

Report this snippet  

You need to login to post a comment.