$("#first").dialog({ width: 304, modal: true,
beforeclose: function (e, ui)
{
$("#confirm").dialog({ width: 500, modal: true,
buttons: {
"Confirm": function () {
document.location.href = "/Home/Index";
},
"Cancel": function () {
$(this).dialog('close');
return false;
}
}
});
}
});
对话框
#first
在等待对话框#confirm
打开之前就关闭了。我知道javascript的confirm()
函数,但我想在这种情况下使用对话框。我该怎么做?