var result = ajaxFun({"json":JSON.stringify(obj)},"zsModelModify/ShowModUploadByExcelOne")
function ajaxFun(form, url) {
var flag = "";
$.ajax({
type: 'POST',
url: ajaxUrl + url + '?r=' + Math.random(),
async: false,
data: form,
contentType: 'application/x-www-form-urlencoded; charset=utf-8',
dataType: 'json',
error: function (XMLHttpRequest, textStatus, errorThrown) {
var obj = new Object();
obj.flag = false;
flag = obj;
},
success: function (info) {
flag = info;
}
});
return flag;
}
function getAjaxData(){
var obj = new Object()
$(".dataform").each(function(){
obj[$(this).attr("name")] = $(this).val();
})
obj.lzdh = $("#changeZsBh").find("option:selected").attr("data-lzdh");
obj.djh = $("#changeZsBh").find("option:selected").attr("data-djh");
return obj;
}
$.post(
ajaxUrl+'common/queryDept?r='+Math.random(),
{"param":""},
function (info){
var res = $.parseJSON(info);
$("#jcbm").html("<option value=''>请选择</option>"+res.options);
$("#jcbm").val('${sessionScope.userSession.deptId}');
getGw($("#jcbm").val(),'${sessionScope.userSession.gwId}');
},"text"
)
常用代码
最新推荐文章于 2023-03-06 14:42:51 发布