javascript – 如何隐藏Jquery UI对话框上的按钮

参见英文答案 > How can I disable a button on a jQuery UI dialog?14个
我一直在使用JQuery UI对话框.我正在使用以下代码.任何人都可以让我知道如何在点击后隐藏导出按钮
$( "#dialog-confirm1" ).dialog({
            resizable: false,height:350,width:650,modal: false,autoOpen:false,buttons: {
                "Export": function() {
                    exportCSV(2);


                },Cancel: function() {
                    $( this ).dialog( "close" );
                }
            }
        });

解决方法

您可以使用$(‘.ui-button:contains(Export)’).hide():(以下代码在您单击时隐藏导出按钮)
$( "#dialog-confirm1" ).dialog({
            resizable: false,buttons: {
                "Export": function() {
                    exportCSV(2);
                    $(event.target).hide();


                },Cancel: function() {
                    $( this ).dialog( "close" );
                }
            }
        });

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...