标签:enum 成功 form class host else 提交 oda pretty
//获取待更改指标的id
function getZBId(obj){
temp = $(obj).attr("optionId");
}
//编辑指标名称
function editZB(obj){
var zbId = temp;
var zbName = $("#zb_name").val();
var strJson={};
strJson.id=zbId;
strJson.name=encodeURIComponent(zbName);
$.ajax({
type:"get",
url:"http://localhost:8080/DemoPlatform/zb-UpdateZB.action",
data:strJson,
dataType:"jsonp",
error:function(error){
swal("失败","更新指标失败","question");
},
success:function(data){
if(data.success === 1){
swal("更新成功","成功更新指标名称","success");
$(‘#zbBody‘).html(‘‘);
getZBsByPage();
$(‘#editZB‘).modal(‘hide‘);
}else{
swal("更新失败","未成功更新指标名称","error");
}
}
});
}
标签:enum 成功 form class host else 提交 oda pretty
原文地址:http://www.cnblogs.com/mario-nb/p/6473184.html