设置JQuery事件时绕过窗口上的弹出阻止程序。
$('a[href*=/viewpage?number]').live('click', function(e) { e.preventDefault(); redirectionURL = this.href; pageId= getUrlVars(redirectionURL)["number"]; $.getJSON("redirect/" + pageId, {}, function(status) { if (status == null) { alert("Error in verifying the status."); } else if(!status) { $("#agreement").dialog("open"); } else { window.open(redirectionURL); } });});
e.preventDefault();