jquery - 禁用 JQuery 消息框外部的单击

标签 jquery messagebox

我想禁用我的外部背景,在 Jquery 消息框中查看,我编码了以下样本。请给我一个解决方案。 谢谢。

    <script src="js/bootstrap.min.js"></script>
     @if (TempData["SuccessEdit"] != null)
    {
        <script>
            $(function () {
                $("#green").dialog();

            });
        </script>
    }

<div id="green">
    <p>Successully Updated</p>
</div>

最佳答案

只需在初始化中指定modal: true即可:

$(function () {
  $("#green").dialog({
    modal: true
  });
});

关于jquery - 禁用 JQuery 消息框外部的单击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32200713/

相关文章:

button - 如何在 Ext.MessageBox Sencha Touch 2.0 的右上角嵌入自定义关闭按钮

javascript - jQuery UI draggable scrollSpeed 的单位是什么?

javascript - Slick.Grid 中有没有一种方法可以将所有数据呈现到数组中以便导出?

c# - 警报消息框

python - 如何在python 3中更改或禁用tkinter消息框的默认声音

javascript - Durandal 路由器未激活

javascript - 粘性按钮到 sidr 侧面板

javascript - Bootstrap 3 - 将按钮对齐到底部

jquery - 使用 Bootstrap 3 模式时接收错误 0x800a01b6 - JavaScript 运行时错误 : Object doesn't support property or method 'modal' ,

c# - 强制以编程方式关闭 MessageBox