我有这个功能
function notify()
{
alert('oo');
$("#SuccessNotification").dialog({
bgiframe: true,
modal: true,
title: 'success',
buttons: {
Ok: function() {
$(this).dialog('close');
}
}
});
}
每次调用此函数时警报都会起作用,但对话框只是第一次出现
答案 0 :(得分:1)
您必须使用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');
}