Home  >  Article  >  Web Front-end  >  Can the page perform a function when the user returns to itself?_html/css_WEB-ITnose

Can the page perform a function when the user returns to itself?_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:49:021032browse

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>


Reply to the discussion (solution)

Reference http://www.oschina.net/code/snippet_136861_5090

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn