[英]Why isn't the URL being executed?
I have this little bit of JS code: 我有一些JS代码:
$("#ProcessGroupRevisions").change(function () {
if (this.value == -1) {
var processId = $("#Processes").prop("value");
'@Url.Action("AddNewRevision","SetpointManagement") ? processGroupId =' + @ViewBag.ProcessGroupId + '& processId=' + processId;
}
});
When this files, the generated URL is as follows: 当此文件时,生成的URL如下:
The problem is that the URL is never executed. 问题是该URL从不执行。 The view is never loaded. 该视图从不加载。 What do I need to change to actually execute the URL? 我需要更改什么才能实际执行URL?
Because you have spaces before and after a question ?
因为您在提问前后都有空格?
mark. 标记。 And then after =
. 然后在=
之后。 And then a space after &
. 然后&
后面的空格。
Thank you everyone. 谢谢大家。 The solution is as follows: 解决方法如下:
window.location.href = '@Url.Action("AddNewRevision","SetpointManagement")?processGroupId=' + @ViewBag.ProcessGroupId + '&processId=' + processId;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.