在Ajax表单提交时重定向到另一个页面而不刷新页面 [英] Redirect to another page without page refresh on Ajax Form submission

查看:66
本文介绍了在Ajax表单提交时重定向到另一个页面而不刷新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在MVC中有一个Ajax表单,在提交时显示结果在同一页面本身。但是我喜欢在提交时将输出重定向到新页面而没有页面刷新。提前谢谢。

Hi,
I have an Ajax form in MVC which on submission display result in same page itself.But i like to redirect the output to a new page on submission with the same output without page refresh.Thanks in advance.

推荐答案

如果我的期待没有错,那么你可以试试:
: -

If I am not wrong in my anticipation,
you can try with:-


.ajax({
url:
data:
成功: function ()[
window location .href = REDIRECTION URL GOES HERE
}
});
.ajax({ url:"", data:"", success: function()[ window.location.href = "REDIRECTION URL GOES HERE" } });



希望这无论如何都有帮助。

如果有的话,回复你的查询。

谢谢。)


Hope this helps anyway.
Post back your queries if any.
Thanks.:)


这篇关于在Ajax表单提交时重定向到另一个页面而不刷新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆