ajax请求
1、比较正常的ajax请求;传递到后台的参数是id:1;形式 function alertModel(id){ console.log("修改的id:"+id); $.ajax({ url: "", type: "post", data: { id: id }, success:function(data){ console.log(data); } }); } 2、请求的时候,参数进行处理 function saveModel(){ var p = []; var temp = {}; temp.modelStandardName = $("#modelStandardName").val(); temp.modelFactory = $("#modelFactory").val(); temp.modelBrand = $("#modelBrand").val(); temp.modelCateName = $("#modelCateName").val(); temp.modelYear = $("#modelYear").val(); temp.modelClass = $("#modelClass").val(); temp.modelType = $("#modelType").val(); temp.modelCountry = $("#modelCountry")