Home > Article > Web Front-end > Can the page perform a function when the user returns to itself?_html/css_WEB-ITnose
RT, there is a page whose content is generated by ajax return, but I found that in the mobile QQ browser, when returning to this page from other pages, the generated content will not be displayed, so I would like to ask for advice. What is the solution?
I saw such a method, but I don’t understand it.
/*在页面加上以下代码,一旦用户返回回来,立即刷新页面。 */ <input name=returnToThisPage ><script language=javascript defer> if(document.all.returnToThisPage.value!=""){ alert("刷新");//window.location.href="test.jsp";//刷新代码。}document.all.returnToThisPage.value=1;</script>
Reference http://www.oschina.net/code/snippet_136861_5090