$("#myform").submit(function () {
$.ajax({
url: "/tools/shopus.ashx?action=Register",
//请求的url地址
data: $('#myform').serialize(),
type: "POST",
//请求方式
async: false,
cache: false,
success: function (data) {
alert(data);
window.location.href = "/ShopUser/Index";
},
error: function (req) {
alert(req);
}
});
});
MVC不需要加后缀名,而且后缀是cshtml不是html
追答js它认识mvc吗?
已经success了能显示 alert(data);的结果,就是无法跳转页面
我直接放个http://www.baidu.com上去都跳不了
本回答被网友采纳