简体   繁体   English

发生特定情况时,如何使用ajax和php重定向所有页面

[英]How can i redirect all page using ajax and php when a particular condition occur

I have a user login part in my website using php , jquery and ajax .I am not much familiar with ajax and jquery . 我的网站上有一个使用phpjqueryajax的用户登录部分。我对ajaxjquery不太熟悉。

I want to redirect my whole page to another page when the user login is correct. 当用户登录正确时,我想将整个页面重定向到另一个页面。

But now the problem is that only the user login part is redirecting to another page, other parts of the page remain unchanged. 但是现在的问题是,只有用户登录部分重定向到另一个页面,页面的其他部分保持不变。

Please help me to redirect my whole page when the user login is correct. 当用户登录正确时,请帮助我重定向整个页面。

要将客户端重定向到使用JS的另一个页面,您可以使用:

window.location = '**url_to_redirect**';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM