```
layer.confirm删除确认写法
function del_e(option,paramdata,callback,msg,sub) {
layer.confirm(msg == undefined ? '您要删除当前所选项目?' : msg, {btn: ['确定', '取消'], title: "提示"},
function () {
$.ajax({
url: option.model_name + (sub == undefined ? '/deleteIds' : sub),
data: paramdata,
datatype: 'json',
success: function (result) {
if (callback != null) {
callback(result);
} else {
if ( result.success) {
layer.msg(result.msg,{
icon : 6,
time : 1200
},function () {
layer.closeAll();
});
editRow = undefined;
} else {
layer.msg(result.msg,{
icon : 5,
time : 1200
},function () {
layer.closeAll();
});
}
}
}
});
});
}
```
网友评论