我试图阻止用户关闭模式而不按关闭按钮(通常情况下,您可以轻敲模式,它将关闭),但是我可以从不关闭,但关闭按钮仍然不起作用!:防止关闭模式
$('#manageRooms').on('hide.bs.modal', function (e) {
$('#manageClose').click(function (event) { //Have they pressed the close button?
$(this).data('clicked', 'yes');
}
);
if (!data) return e.preventDefault(); // stops modal from being hidden
})
你正在使用哪个插件? – Bala
bootstrap www.getbootstrap.com –