302 Redirection with AJAX post request:
I'm implementing logout functionality for a web application. I have a function, which is called when the user clicks the sign out button.
$.post(window.location.pathname + '/logout');
The logout service works only with post.
What happens is:
What I would like to happen is:
如果您不想使用Ajax处理响应,则不要使用Ajax。
<form action="/logout" method="post">
<input type="submit" value="logout">
</form>
链接地址: http://www.djcxy.com/p/45420.html
下一篇: 使用AJAX发布请求重定向302: