javascript 禁用 Jquery UI 对话框中的关闭按钮

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3810494/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 02:20:21  来源:igfitidea点击:

Disable close button in Jquery UI Dialog

javascriptjqueryhtmljquery-uijquery-ui-dialog

提问by Manas Babu

Possible Duplicate:
Remove close button on jQueryUI Dialog?

可能的重复:
删除 jQueryUI 对话框上的关闭按钮?

I am getting some problem to disable close button in JQuery UI Dialog.

我在禁用 JQuery UI 对话框中的关闭按钮时遇到了一些问题。

My code is like bellow.

我的代码如下。

$(document).ready(function () {
     $("#dialog").dialog({ 
            modal: true,
            width:800
     });
});

Thanx in Advance

提前致谢

回答by Umakanta.Swain

Try this It ll work..

试试这个它会工作..

$(document).ready(function () {
    $("#dialog").dialog({  
        open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
        modal: true,
        width:800
    });
});