abstract:這篇文章主要介紹了BootStrap 模態(tài)框?qū)崿F(xiàn)刷新網(wǎng)頁(yè)并關(guān)閉的功能,實(shí)現(xiàn)方法簡(jiǎn)單易懂,需要的朋友可以參考下方法與實(shí)現(xiàn)hide.bs.modal,當(dāng)調(diào)用 hide 實(shí)例方法時(shí)觸發(fā)。 $('#identifier').on('hide.bs.modal', function () { //&nb
這篇文章主要介紹了BootStrap 模態(tài)框?qū)崿F(xiàn)刷新網(wǎng)頁(yè)并關(guān)閉的功能,實(shí)現(xiàn)方法簡(jiǎn)單易懂,需要的朋友可以參考下
方法與實(shí)現(xiàn)
hide.bs.modal,當(dāng)調(diào)用 hide 實(shí)例方法時(shí)觸發(fā)。 $('#identifier').on('hide.bs.modal', function () { // 執(zhí)行一些動(dòng)作... })
hidden.bs.modal,當(dāng)模態(tài)框完全對(duì)用戶隱藏時(shí)觸發(fā)。
$('#identifier').on('hidden.bs.modal', function () { // 執(zhí)行一些動(dòng)作... })
源碼示例
$('#confirmRevokeOrder').on('hidden.bs.modal',function(){ var urla ='/service/csOrderHistoryAction_csOrderHistoryListTo.action'; openNewTab({ url: urla, tabName: '預(yù)訂跟蹤', callback: function () { } }); }); $('#confirmRevokeOrder').modal('hidden');
PS:BootStrap 模態(tài)框禁用空白處點(diǎn)擊關(guān)閉
模態(tài)框?yàn)樾畔⒕庉嫶翱?涉及好多內(nèi)容,填了半天,若一不小心點(diǎn)了空白處.....
$('#myModal').modal({backdrop: 'static', keyboard: false});
backdrop:static時(shí),空白處不關(guān)閉.
keyboard:false時(shí),esc鍵盤不關(guān)閉.
上述代碼用以打開模態(tài)框
更多關(guān)于BootStrap 模態(tài)框?qū)崿F(xiàn)刷新網(wǎng)頁(yè)并關(guān)閉功能請(qǐng)關(guān)注PHP中文網(wǎng)(ipnx.cn)其他文章!