0
     $(".reportCategoryClass").click(function (i) {
                   var reportUrl;
                   reportUrl = "http://bi.mylcchonda.com/UMAP_BI_REPORTS_PROD";
                    window.open("/LLCReportRoute/LLCReportsPopUp?url=" + reportUrl);
                    // window.open("/ControllerName/ActionName?url=" + reportUrl);
                }
});

window.open 函数打开窗口但在该页面中找不到错误即将到来

提前致谢

4

2 回答 2

0

LLCReportRoute 在站点的根目录中吗?当您在那里使用绝对参考时,这可能是您的问题。要使其相对,请删除开头的“/”。

于 2012-11-08T14:25:35.603 回答
0

这是因为 reportUrl。您需要对其进行编码。尝试这个:

$(document).ready(function() {
    $(".reportCategoryClass").click(function () {
                       var reportUrl;
                       reportUrl = encodeURIComponent("http://bi.mylcchonda.com/UMAP_BI_REPORTS_PROD");
                        window.open("/LLCReportRoute/LLCReportsPopUp?url=" + reportUrl);

    });
});
于 2012-11-08T14:27:43.397 回答