JS refresh the specified page and refresh the parent page

Source: Internet
Author: User

JS Refresh Frame Script statement
1. How to refresh the page that contains the frame

Method One

<script language= Web page Special effects >
Parent.location.reload ();
</script>
2. child window Refresh parent window
<script language=javascript>
Self.opener.location.reload ();
</script>


Method Two

<body onload= "opener.location.reload ()" > Refresh when opening windows
<body onunload= "Opener.location.reload ()" > Refresh when closed
<script language= "JavaScript" >
Window.opener.document.location.reload ()
</script>

Method Three

Window.location.reload ()
var oiframebody = document.frames ("Syourframeid"). Document.body;

How to refresh the page of another frame (illustrated by the example above)
Statement 1. Window.parent.frames[1].location.reload ();
Statement 2. Window.parent.frames.bottom.location.reload ();
Statement 3. window.parent.frames["Bottom"].location.reload ();
Statement 4. Window.parent.frames.item (1). Location.reload ();
Statement 5. Window.parent.frames.item (' Bottom '). Location.reload ();
Statement 6. Window.parent.bottom.location.reload ();
Statement 7. window.parent[' Bottom '].location.reload ();

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.