ajax 小记

 var options = {
   type : 'POST',//请求类型,post or get
   url : "FinishInstallationAction",//后台action
   data : $.param({
    jsonPageModel : strpagemodel,
    id : gci_id
   }, true),//给后台的参数
   success : function(r, status) {
        //r是后台的返回结果
    window.location = $("base").attr("href") + "index.jsp";
   },//请求成功后触发
   dataType : "json",//参数类型
   error : function(result) {
    ShowAlertInfo("error");
   }
  };//请求失败时触发
  $.ajax(options);
原文地址:https://www.cnblogs.com/wxj111/p/3459190.html