function delRow() {
if (id != null) {
swal({
title : "确定操作吗?",
text : "是否删除科目\"" + names + "\"",
type : "warning",
showCancelButton : true,
confirmButtonText : '确定'
}, //用来弹出 提示框
function() {
$.ajax({
url : "/TRAMS/subject?operateFlag=delete&id=" + id, // 数据发送方式
type : "post", // 接受数据格式
dataType : "json", // 要传递的数据
success : function(data) {
if (data.msg == "success") {
swal('提示', "删除成功", 'success');
initdatas();
} else {
swal('提示', "删除失败", 'error');
}
}
});
});
} else {
swal('提示', '请选择一行数据!');
}
}