本文实例为大家分享了集合Bootstrap自定义confirm的具体代码,供大家参考,具体内容如下
这里写图片描述
js端
$("#common_confirm_btn").click()
//每次都将监听先<a href="https://www.f2er.com/tag/guanbi/" target="_blank" class="keywords">关闭</a>,防止多次监听发生,确保只有一次监听
model.find(".cancel").die("click")
model.find(".ok").die("click")
model.find(".ok").live("click",function(){
params.operate(true)
})
model.find(".cancel").live("click",function(){
params.operate(false)
})
}
}
html端
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span></button>
<h5 class="modal-title"><i class="fa fa-exclamation-circle"></i>
<span class="title"></span>
</h5>
</div>
<div class="modal-body small">
<p ><span class="message"></span></p>
</div>
<div class="modal-footer" >
<button type="button" class="btn btn-primary ok" data-dismiss="modal">确认</button>
<button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
</div>
</div>