Here is the front desk JS Code section
$.ajax ({url: "http://tttcuxiao.uz.taobao.com", <span style= "White-space:pre" ></span>//here is the commit URL example Child link Type: "Get", <span style= "White-space:pre" ></SPAN>//JSONP must be get mode, post not supported, note DataType: "Jsonp", Data: $ ("#inquiryform"). Serialize (), Jsonp: "Callback", Jsonpcallback: "FL Ighthandler ",//can be customized to modify, lazy people can be directly? Beforesend:function () {$ (" #inquirypost "). Val (" Loa Ding ... "); }, Success:function (msg) {if (msg.txt== "Success") {//msg.txt corresponds to the following background code $ ("#inquirypost"). Val ("sended"); Alert ("Your Inquiry submitted successfully"); } else{$ ("#inquirypost"). Val ("Failed"); alert (msg.txt); }}, Error:function (XMLHttpRequest, Textstatus, Errorthrown) {$ ("#inq Uirypost "). Val (" Error ").); Alert ("Net Error,please again! "); } });
Here is the code section of the URL page background
String msg = "Flighthandler ({\" txt\ ": \" Success\ "})";//here Flighthandler corresponds to the above custom callback name, TXT corresponds to Msg.txtResponse.Write (msg) ; Response.End ();
is not very simple to achieve, if you do not understand can call me at any time QQ 1254584012
JS cross-Domain Submission Form "Detailed tutorial, package resolution"