ASP. NET: How to refresh the JavaScript scripts of the parent window

Source: Internet
Author: User
How does ASP. NET publish and refresh the parent window?

1. This. response. Write ("<SCRIPT> opener. Location. Reload (); </SCRIPT> ");

2. This. response. Write ("<SCRIPT> opener. Window. Location. href = opener. Window. Location. href; </SCRIPT> ");

3. response. Write ("<script language = JavaScript> opener. Window. navigate (''the iterator. asp you want to refresh''); </SCRIPT> ")

JS refresh the compile sentence of the framework

// How to refresh the faces containing the framework

<Script language = JavaScript>

Parent. Location. Reload ();

</SCRIPT>

// Refresh the parent window in the Child Window

<Script language = JavaScript>

Self. opener. Location. Reload ();

</SCRIPT>

(Or <a href = "javascript: opener. Location. Reload ()"> refresh </a>)

// How to refresh the plane of another framework

<Script language = JavaScript>

Parent. otherframeid. Location. Reload ();

</SCRIPT>

If you want to refresh the window during closing or when you want to open the window, use the following sentence in <body>.

<Body onload = "opener. Location. Reload ()"> refresh when opening a window

<Body onUnload = "opener. Location. Reload ()"> refresh during off-peak hours

<Script language = "JavaScript">

Zookeeper opener.doc ument. Location. Reload ()

</SCRIPT>

 

Javascript refresh the response surface (Javascript refresh page) Methods:

1 history. Go (0)

2 location. Reload ()

3 location = Location

4 location. Assign (location)

5 document.exe ccommand ('refresh ')

6 window. navigate (location)

7 location. Replace (location)

8 Document. url = location. href

Methods for auto-Refresh faces:

1. Face-to-Face auto-Refresh: Add the following generations to the

<Meta http-equiv = "refresh" content = "20">

Among them, 20 refers to refreshing the plane every 20 seconds.

2. Face-to-Face auto-hop: Add the following generation to the

<Meta http-equiv = "refresh" content = "20; url = http://www.wyxg.com">

Among them, 20 refers to jump to the http://www.wyxg.com face every 20 seconds

3. Face-to-Face auto-Refresh JS Edition

<Script language = "JavaScript">

Function myrefresh ()

{

Window. Location. Reload ();

}

SetTimeout ('myrefresh () ', 1000); // refresh once per second

</SCRIPT>

0 0

0

(Please Article Make comments)

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.