[英]How to reload the page after logging out <javascript>
I am building a webpage and I'm having issues refreshing the page after I log out.我正在构建一个网页,但在我注销后刷新页面时遇到问题。 What I do when I log out is basically hiding one div and then show the "maindiv" which is basically the main page where you log in. Something like this:当我注销时,我所做的基本上是隐藏一个 div,然后显示“maindiv”,它基本上是您登录的主页。像这样:
function myfunction(){
$("#seconddiv").hide();
$("#maindiv").show();
}
This works perfectly fine in order to take me to the main page but when I try to log in again, it won't work.为了将我带到主页,这非常有效,但是当我尝试再次登录时,它不起作用。 Thanks in advance if you can give me some advice.如果您能给我一些建议,请提前致谢。
你可以试试这个:
window.location.reload()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.