layer弹出框、提示框及确认框

弹出框

<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:
            '
\n' + '提交\n' + '
'
}); $("#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);
});

你可能感兴趣的:(leading,layer弹出框,提示框及确认框)