簡體   English   中英

該功能在第二次調用時不起作用

[英]Function doesn't work at second call

我有這個功能

function notify()
    {
    alert('oo');
        $("#SuccessNotification").dialog({
        bgiframe: true,
        modal: true,
        title: 'success',
        buttons: {
            Ok: function() {
                $(this).dialog('close');                

            } 
        }
            });
    }

每次調用此函數時警報都會起作用,但對話框僅在第一次彈出

您必須使用open參數調用對話框,如下所示:

function notify()
{
    alert('oo');
    var elem = $("#SuccessNotification")
    elem.dialog({
    bgiframe: true,
    modal: true,
    title: 'success',
    buttons: {
        Ok: function() {
            $(this).dialog('close');                

        } 
    }
        });
    elem.dialog('open');
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM