Several methods of page refresh

Source: Internet
Author: User

JavaScript refreshes the page in several ways:

1 history.go (0)

2 Location.reload ()

3 location=location

4 Location.assign (location)

5 Document.execcommand (' Refresh ')

6 Window.navigate (location)

7 Location.replace (location)

8 document. Url=location.href.

____________________________________________

Frames page: (One of the sub-pages in a frames page)

Top.location.reload (); Refresh full Page
Self.location.reload (); Refresh this page

window.parent.location.href= ' frames page redirection

_____________________________________________

How to automatically refresh the page: 1. Automatic page refresh: Add the following code to the

Example: The data added successfully after the dialog box and refresh the page

if (Infoaction_sort.insert (Info_sort))
{
Scriptmanager.registerstartupscript (this. UpdatePanel, this. GetType (), "Alert", "alert (' Add Success for album classification '); Window.location.reload ();", true);

Alert ("album Classification created successfully");
Response.Redirect (Request.Url.ToString ());//Refresh this page
This.txt_AddSort.Text = "";
This.txt_SortDepict.Text = "";
}

Several methods of page refresh

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.