8 ways to refresh a frame's subpages with JavaScript first look at a simple example:
The following three pages are named Frame.html, top.html, bottom.html as examples to specify how to do.
Frame.html consists of two pages (bottom.html) on top (top.html) with the following code:
Now assume that top.html (that is, the page above) has seven button to achieve the bottom.html (that is, the following page) of the refresh, you can use the following seven
This article describes how to use the get_category and get_children functions in WordPress development to obtain categories and subpages. For more information, see
Get_categoryGet_category may not be frequently used, but it is very useful. This function does not seem to introduce much on the Internet, so today we only translate the official WordPress English document.
Function descriptionReturns a specified category in the form of an array or object.
Here are three pages named framedemo.html,top.html,button.html as an example to specify how to do this.
The framedemo.html consists of the top and bottom two pages, the following code:
Now assume that top.html that the above page has a button to achieve the following page refresh, you can use the following seven kinds of statements, which easy to do with their own.
Statement 1. Window.parent.frames[1].location.reload ();
Statement 2. Window.parent.frames.bottom.location.reload ();
Statemen
Bottom.html page is as follows:
Explain:1.window refers to the current page, for example, for this example, it refers to the top.html page.2.parent refers to the parent page of the current page, which is the frame page that contains it. For example, for this example, it refers to framedemo.html.3.frames is a Window object and is an array. Represents all the subpages within the frame.4.item is the method. Returns the elements inside an array.5. If the
Assume that there is a div on the home page, and an IFRAME is placed in it.
CopyCode The Code is as follows: The three menu links are loaded on the IFRAME.
The three subpages load window. onload on their own pages and executeCopy codeThe Code is as follows: function AA (){VaR newheight = Document. Body. scrollheight + 20 + "PX ";Optional bytes parent.doc ument. getelementbyid ("framebox"). style. Height = newheight;// The above Firefox is passed,
Assume that there is a div on the home page, and an iframe is placed in it.Copy codeThe Code is as follows:The three menu links are loaded on the iframe.The three subpages load window. onload on their own pages and executeCopy codeThe Code is as follows:Function aa (){Var newHeight = document. body. scrollHeight + 20 + "px ";Optional bytes parent.doc ument. getElementById ("frameBox"). style. height = newHeight;// The above firefox is passed, but ie6
javascript| Refresh | page
Here are three pages named framedemo.html,top.html,button.html as an example to specify how to do this.
The framedemo.html consists of the top and bottom two pages, the following code:
Now assume that top.html that the above page has a button to achieve the following page refresh, you can use the following seven kinds of statements, which easy to do with their own.
Statement 1. Window.parent.frames[1].location.reload ();
Statement 2. Window.parent.frames.bottom.locati
When you encounter a situation where you can't debug JavaScript code when submitting to a subpage, here's a good workaround, and hopefully it will help. In a recent project, you will not be able to debug JavaScript code when submitting to a
Iframe pages are embedded in the parent page. Generally, iframe pages are used by default for relevant actions in the iframe, which does not affect the parent page. What should I do if I need to operate the elements of the parent page on the Child
Motherboard page:
HTML code
Head Runat = "Server" > Title > No title page Title > Meta Name = "Keywords" ID = "K1" Content = "1, 2, 3 "/ > Head >
Subpage content title and keywords
In a recent project, you will not be able to debug JavaScript code when submitting to a child page, sometimes this problem, we can not normal in the browser, see our child page JavaScript code, so can only use the original alert or Console.log (),
1. Sub-page: parent page element parent.doc ument. getElementById (& amp; #39; id & amp; #39;) and document-related methods can be used in this way. 2. Access the child page element document on the parent page. getElementById (& amp; #39; iframeId &
This article mainly introduces how to display the Parent and Child pages of JavaScript. When a page is opened, the parent page is DISABLE. When the child page is closed, the parent page is ENABLE, it is a practical technique. If you need it, you can
The communication method varies depending on whether the src attribute in iframe is the same domain link or cross-domain link. The following is a good example, for more information about the communication between the iframe subpage and the parent
The following describes how to do this by naming the three pages as framedemo.html, top.html, and button.html.
In this example, framedemo.html consists of two pages,CodeAs follows:
framedemo
Now, let's set the top.html, that is, there is a
1. Access the parent page element parent.doc ument on the Child page. getElementById ('id') and document-related methods can be used in this way. 2. Access the child page element document on the parent page. getElementById ('iframeid ').
IFrame is a very common HTML element, if the method of using the child page in the parent page should be how to write it, the following is a simple introduction.one, the parent page code
Parent page
function parentfunction ()
{
alert
navigation bar at will.
You can use it for free. If you want to use your own domain name, you must use the paid version.
Keywords:Automatic Generation, response template, multi-device configuration, drag-and-drop interfaceWeebly
Weebly: the free self-help website creation service platform is a free self-help website creation service provider from the United States. What you see online is what you get, and you can easily create your own website. Is t
, you can easily create your own site. is one of the most convenient ways to create and upload websites and share them with people all over the world for free. The design platform is a white label solution that enables designers to easily use Weebly's content management system to build websites for their customers.From personal to professional websites, Weebly will help you spend your time on the most valuable content. Simply said is a personal site t
Application Scenarios
Multiple small programs under the same subject (company, Department)
These small programs, consisting of a master applet and later new lines of business (each line of business has a separate applet)
Small programs for each line of business need to be mounted under the main program, as the main program diversion
At the same time, the business lines of their own applet also released as usual update
= = A set of code, to generate a separate package and sub-pa
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.