简体   繁体   中英

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:

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()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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