【发布时间】:2015-12-07 16:52:30
【问题描述】:
我正在尝试在 mvc 4 中使用 javascript 打开一个新窗口 (window.open)。这是我当前的代码:
var url = '@Url.Action("Index", "ReportExecution", new {target="_blank"})';
window.location.href = url;
这不会打开一个新窗口。它使 url “ReportExecution/Index?target=_blank”。我尝试使用:
window.open
而不是
window.location.href
但这没有用。这如何实现?
【问题讨论】:
标签: javascript asp.net-mvc asp.net-mvc-4