删除按钮触发模态框
<!--确认删除-->
<div id="deleteModal" class="modal hide fade" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<h4 id="myModalLabel">操作确认</h4>
<a class="close" data-dismiss="modal" aria-hidden="true"
href="javascript:void();">×</a>
</div>
<div class="modal-body">
<i class="Hui-iconfont"></i> 确认删除选中的项?
</div>
<div class="modal-footer">
<div class="col-xs-6">
<button class="btn btn-primary" id="deleteConfirm">确定</button>
</div>
<div class="col-xs-3">
<button class="btn btn-primary" data-dismiss="modal"
aria-hidden="true">取消</button>
</div>
</div>
</div>
<!--点击删除按钮触发删除操作-->
$("#deletePostalShift").bind("click", function() {
if ($("tbody input[type='checkbox']:checked").length == 0) {
layer.msg('请选择要删除的项');
return;
}
$("#deleteModal").modal('show');
});