弹出框
<a onClick="checkIn(this)" id="0">弹出框</a>
function checkIn(obj) {
var id = $(obj).attr('id');
var index = layer.open({
type: 1,
title: '弹出框标题',
area: ['550px', '200px'],
shadeClose: true,
content:
'<div>\n' +
'<a id="check">提交</a>\n' +
'</div>'
});
$("#check").click(function () {
......
return false;
}
layer.close(index);
$.ajax({
type: "post",
data: {},
url: "",
async: true,
dataType: "json",
success: function(data) {
window.location.href = "";
}
});
});
}
提示框
layer.msg('提示框',{icon:5,time:1000});
确认框
layer.confirm('你确定要删除该广告吗?', {icon: 3, title:'提示'}, function(index){
......
layer.close(index);
});