1. There are multiple external links written on the homepage;
2. When you enter the homepage, a pop-up window will be displayed. When it is clicked to close, use the js click event to set the display of the pop-up window to none and hide the pop-up window;
3. Click to enter other link pages, and then go back through the browser's back button or Android phone WeChat. It will return to the homepage, but the pop-up window will pop up again. Is there any solution? After going back, you don’t want the pop-up window to be displayed, and it will be displayed as the state before the jump
巴扎黑2017-06-26 10:56:39
Set a cookie, record the status, and enter the page to determine whether there is a cookie. If there is a cookie, there will be no pop-up window. If not, there will be a pop-up window.
扔个三星炸死你2017-06-26 10:56:39
As mentioned above, using cookies, jquery’s cookie is particularly simple. If you don't consider supporting IE browser, you might as well use h5's new features localstorage or sessionstorage.
阿神2017-06-26 10:56:39
Cookie, localstorage; there is also an event popstate
that may be used in conjunction with history.pushState
cookie should be able to achieve the effect.