.ajaxSubmit ( SUCCESS_FN )
ajaxSubmit() function is used to submit a HTML Form element using AJAX. This method is applied to form elements. Form's method is used for AJAX type (GET/POST). Form's action is used for AJAX Server URL. Form's input elements and values are sent as AJAX data to the server.
Parameters
Example 1
Submit a form with input text field. Show the sever response in a div.
JS
HTML
CSS
$.domLoaded(function() { $.get("#ajax1").on("click", function() { $.get("#details").ajaxSubmit(function(res) { $.get("#result").html(res); }); }); });
Result
| |||||||