1.封装ajax var defaultUrl http://192.168.1.1:3000/function post_data(url,data,successfn,errorfn){$.ajax({url: defaultUrlurl,data: data,dataType: json,async: false,type: post,success: function(res) {successfn(res);},error: function(err) {errorfn(err);}});
…