How to refresh the page

Source: Internet
Author: User
There are many ways to refresh pages, including HTML <meta> tags, JavaScript, programming scripts (such as ASP), and post code (such as C.
You can do this in HTML: <meta http-equiv = "refresh" content = "3; url = http: // 192.168.102.28/BBS">
<! -- Jump to http: // 192.168.102.28/BBS 3 seconds later. If the URL attribute is not added, refresh yourself. -->

JavaScript method: 1history. Go (0)
2location. Reload ()
3 location = Location
4location. Assign (location)
5document.exe ccommand ('refresh ')
6window. navigate (location)
7location. Replace (location)
8document. url = location. href

C # and ASP method: 1response. Redirect (URL );
2response. Write ("<SCRIPT> window. Location = Window. Location; </SCRIPT> ");

You need to know the following points:
1. Location. Reload () and location = location are different: After the page is submitted, the call of the former will cause the page to be submitted again, while the latter will re-load the page before submission.
2. The second method in C # is essentially the JavaScript method.
3. There is no description of how to refresh the framework structure or new window with JavaScript. In these cases, the refresh is nothing more than finding the location of the window to be refreshed, and then proceed accordingly, for example, use parent or opener.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.