抱歉,伙计们问了那个愚蠢的问题,但我对那件事有疑问。有这样的脚本,它应该返回真或假,但在绘制该 html 弹出窗口并从该方法获得响应之后。
$("#pageInfo a.btnDel").click(function () {
$("#cmsSmallPopUpWindowMessage").html("<h2>Do you really want to delete this page?</h2><center><div style='width:130px'><ul class='bactions'><li><a id='cmsSmallPopUpWindowBYes' href='javascript:void(0)'><span><span>Yes</span></span></a></li><li><a id='cmsSmallPopUpWindowBNo' href='javascript:void(0)'><span><span>No</span></span></a></li></ul><div class='archor'></div></div></center>");
$.blockUI({ message: $("#cmsSmallPopUpWindow"), css: { width: "530px", border: "0px", backgroundColor: "transparent"} });
setTimeout(function () {
$.unblockUI();
}, 6000);
$("#cmsSmallPopUpWindowBNo").click(function () {
$.unblockUI();
return false;
});
$("#cmsSmallPopUpWindowBYes").click(function () {
$.unblockUI();
location.reload();
return onDelete($(this).attr('href'));
});
return true; // this should change for "false" or "true" but after click on "yes" or "no"
});