1
我想在sweetAlert
警报上单击“确定”按钮后调用引导程序模式。如何在'sweetAlert'警报'ok'点击后调用引导模式?
所以,用户点击OK
按钮后sweetAlert
提醒。它会自动调用bootstrap模态。我在JavaScript中尝试了下面的代码,但没有奏效。
BOOTSTRAP MODAL
<div class="modal fade" id="change_password" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body change_password">
</div>
</div>
</div>
</div>
JS代码
<script language='javascript'>
swal({
title: 'Sample Title',
text: 'Hi',
type: 'success',
allowOutsideClick: true,
html: true
},
function() {
$('#change_password').modal('show');
});
</script>
嘿,我工作。在这里检查你的代码:[https://jsfiddle.net/tejashsoni111/baohk928/](https://jsfiddle.net/tejashsoni111/baohk928/) – tejashsoni111
确保你正在按照正确的顺序包含'JavaScripts'。 – tejashsoni111
@ tejashsoni111我的坏...谢谢!你是对的 –