Home >Web Front-end >JS Tutorial >Javascript refreshes the complete set of commonly used codes_javascript skills

Javascript refreshes the complete set of commonly used codes_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:41:3151010browse

One: Refresh this page
Frontend:

Backend: Response.Write("
") Two: Refresh the parent page
Frontend: opener.location.href=opener.location .href;

Backend: Response.Write("
")
Three: Link to the specified web page
Frontend:

MSDN says window.navigate(sURL) The method is for IE and not applicable to FF. In the HTML DOM Window Object, the window.navigate method is not listed at all.
Backend: Response.Write("
")
Or: Response.Write("NewUrl");
Four: Refresh Iframe
Foreground: <script> <script><script>window.location.href=window.location.href;</script> Five: Regular refresh<script>window.location.href=window.location.href;</script>function flash(){window.location.href="http://www.jb51.net";setTimeout("flash()",1000);} //1000 is one second<script>opener.location.href=opener.location.href;</script><script>window.location.href='http://www.jb51.net';</script> <script>window.location.href='yourpage.aspx';</script><script>iframe名字或者ID.location.reload(true);</script>setTimeout("self.location.reload();",1000);<script>setTimeout("location.href=http://www.jb51.net",2000)</script>Once a second

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