javascript - After entering the page from the menu in WeChat web development, pressing the return key does not close the browser but refreshes the current page. Any solution?
阿神
阿神 2017-06-30 09:57:38
0
1
850

I am currently developing a public account, and I am doing a spa. After entering the public account from the menu, for example, entering the A page, pressing the return key does not exit the web page, but refreshes the A page, resulting in a very poor experience, but I see other people The public accounts are all exiting the web page. I guess the reason is caused by WeChat authorization redirection. Because I copied the link after pressing return and the link before redirection are the same every time. The current requirement is that when pressing the return key, if the link is consistent with the link before redirection, exit the webpage directly instead of refreshing the page. Seek solutions. urgent! ! !

阿神
阿神

闭关修行中......

reply all(1)
扔个三星炸死你

Listen to the popstate event, and if the link is consistent with the link before redirection, execute the exit operation of jssdk

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!