This article is mainly about the AJAX submission URL and the difference between the Ajax submission form, the need for friends can come to the reference, I hope to help you.
1:ajax constructs a URL that passes parameters to data and cannot be used for form submission. Example: code is as follows: function createhtml (ID) { $ ("#reloading"). Show ();  //EDIT_BG is a div, displayed when submitted, This allows the background page to not operate. $ ("#edit_bg"). Show (); $.A Jax ({ type: "POST", URL: " Pageaction!createhtml.action ", data:" id= "+id, success:function (data) { $ ("#reloading"). Hide (); &nbs P $ ("#edit_bg"). Hide (); if (data = = ' True ' { alert ("successful operation.") ");   }else{ alert ("Operation failed , please contact the administrator! "); } }//Operation successful operation } ; } 2:ajax Submission form, which is very useful for large data transfer, such as user registration, letter Very large, with Ajax submission form, the page is more beautiful but, for the Ajax submission form, we have to introduce a JS, that is: Jquery.form.js " Example: code as follows: function UploadFile () { $ ("#reloading"). Show (); $ ("#edit_bg"). Show () ;  //FORM1 for table single-name $ ("#form1"). Ajaxsubmit ({ &N Bsp Type: "POST", success:function (data) { $ ("#reloading"). Hide (); nbsp $("#edit_bg"). Hide (); if (Data.indexof ("true")!=-1) { alert ("Operation succeeded.") "); }else{ alert (data); alert (" Operation failed , please contact the administrator! "); } }//Operation successful operation }; } 3:2 The AJAX submission form can operate correctly, but there is a problem with the data returned and the page does not get the results. The following code corrects the AJAX submission form code as follows: function SubmitForm () { $ (' #form1 '). Ajaxsubmit ( Ajaxoptionsnew); } var ajaxoptionsnew = { &N Bsp Beforesubmit:fn_check_form, Success : Showresponse, URL: "Costation!save2.action", &NBS P   Error:function (xmlresponse) { alert ( Xmlresponse.responsetext); alert (' Operation failed! '); //window.location.reload (); & nbsp } }; function fn_check_form () { if ($ ("#Name"). val () = "") { alert ("Man cannot be empty" ; $ ("#Name"). Focus (); return false; } } function s Howresponse (responsetext) { try{ //alert (responsetext); & nbsp if (ResponseText = = ' true ') { alert (' Operation successful! '); window.location.reload () &nb Sp } &NB Sp else if (responsetext = ' paramfalse ') &N Bsp { alert ("Required parameters cannot be empty!") } &NB Sp else if (responsetext = = ' Timeerror ') &NB Sp { alert ("Departure time is not greater than reimbursement time!");   } else{ &NBSP ; alert (' Operation failed! '); // window.location.reload () &nbs P & nbsp }catch (e) {alert (e.message);} }