弹窗alert:默认确定按钮+右上角关闭
top.layer.alert("请选择要删除的记录!",{shade: 0.3,offset:‘250px‘});
弹窗alert:默认确定按钮(closeBtn:false是让关闭失效隐藏)
top.layer.alert("请选择要删除的记录!",{closeBtn:false,shift:2});
弹窗confirm:两个重新命名按钮(closeBtn:false是让关闭失效隐藏)
弹窗msg:提示信息(1秒后消失并执行function(){})
top.layer.msg(
result.msg,
{time:1000},
function(){}
)
var layerc = top.layer.confirm(‘只能删除当前为否时间段,确定要删除吗?‘,
{btn: [‘是‘,‘否‘],closeBtn :false,shift: 2,}, //重新命名两个按钮
function(){
$.ajax({
url:"${ctp}/basic_project/vendor_reporttime/delReporttime.json",
type:"post",
dataType:"json",
data:{‘pkArr‘:pkArr},
async:false,
traditional: true,
success:function(result){
if(result.success){
top.layer.msg(result.msg,{time:1000},function(){
location.href = "${ctp}/basic_project/vendor_reporttime/reporttime_list.html" ;
})
}else{
top.layer.alert(result.msg,{closeBtn :false,shift: 2});
}
}
})
},
function(){ //点击否按钮
layer.close(layerc); //关闭当前窗口
}
);