Summary of several forms submitted asynchronously using ajax, ajax asynchronous
Three Common submission methods are introduced here.
Method 1
Collect all user input manually and encapsulate it as "k1 = v1 & k2 = v2 ..." Key-value pairs. use $. post (url, data, fn) to submit data to the server.
$.ajax({ type:'post', url:'Notice_noTipsNotice', data:'k1=v1&k2=v2...', cache:false, dataType:'json', success:function(data){ } });
Method 2
Single serialization: $ ('# myform'). serialize (); the return value is the "k1 = v1 & k2 = v2..." key-Value Pair form, and then initiate an asynchronous request. Function noTips () {var formParam = $ ("# form1 "). serialize (); // serialize the table content as a string $. ajax ({type: 'post', url: 'notice _ noTipsNotice ', data: formParam, cache: false, dataType: 'json', success: function (data) {}});}
Method 3
Use the ajaxSubmit () function provided by the jQuery Form plug-in
$ ('# Myform '). ajaxSubmit ({type: 'Get/Post', url: 'xx. php ', dataType: 'json', success: fn, clearForm: true, resetForm: true}); // This function will automatically serialize the selected form and submit it asynchronously.
The above summary of the asynchronous form submission using ajax is all the content shared by the editor. I hope to give you a reference and support for the help house.