在成功的Ajax调用之后,他已经看到了很多有关如何重定向到另一个页面的答案,但是它们都使用GET方法. 相反,我想使用POST方法将参数传递到新页面. 我该怎么办?
He have seen a lot of answers on how to redirect to a different page after a successful Ajax call, but all of them uses a GET method. I'd like, instead, to pass my parameters to the new page using the POST method. How can i do it?
推荐答案好吧,我之前已经遇到过这个问题,唯一的解决方法(也许是我错了)是通过定义AJAX成功回调函数并从该回调函数.如果需要,您可以在AJAX响应中发送回重定向URL本身,并在回调函数中读取重定向URL.
Well i have faced this issue before and the only way to do this seems(maybe i am wrong) to be by defining a AJAX success callback function and redirect from that callback function. If you want you can send back the redirect url itself in the AJAX response and read the redirect URL in the call back function.
更多推荐
使用POST进行Ajax重定向
发布评论