Demand One: How does the main Page a pass the data to the IFRAME B?
In this way, the main page needs to pass the data to the IFRAME B, and then the IFRAME B gets the data for specific processing.
Implementation mode
The trick is to use the hash value of the location object to pass the communication data, and we just need to add a #data string (data is the on
The methods used are very similar:
Copy Code code as follows:
var iframe = document.createelement ("iframe");
IFRAME.SRC = "Http://www.jb51.net";
if (!/* @cc_on!@*/0) {//if not IE
Iframe.onload = function () {
Alert ("Local iframe are now loaded.");
};
} else {
Iframe.onreadystatechange = function () {
if (iframe.readystate = =
At work, we have encountered an IFRAME embedded page highly adaptive problem. Because we don't know how high the IFRAME content page will be loaded, and don't want to appear on the page ugly scroll bar, this time we can use JavaScript to dynamically let the iframe adaptive height.
Preparatory work
We prepare a homepage a.html, as well as two pages for embedding
Sharing an IFRAME today. Automatic adaptation to height based on content changes
Web management software is often structured as follows
The user clicks the page tab to switch the middle of the display content, in the handover process needs to ensure that the previous child pages maintain the previous state. This situation generally uses an IFRAME to display content as a toggle page.
But there is a proble
Detailed description of the differences between iframe and frame, and detailed description of iframeframe
When you get started, you must note that HTML5 does not support frame, and iframe only has the src attribute.
I. advantages and disadvantages of using iframe
Advantages:
1. It is convenient for programs to call static pages;2. Separation of pages and programs
This article mainly introduces the implementation of an IFRAME window highly adaptive Another ingenious idea, the need for friends can refer to the following DomainA has a page index.html that embeds a page in DomainB through an IFRAME other.htmlnbsp; Because the other.html page is displayed in the IFRAME and its page content dynamically increases or decreases,
This article mainly introduces the highly adaptive implementation of the IFrame window, a friend in need can refer to the DomainA has a page index.html that embeds a page in DomainB through an IFRAME other.html Because the other.html page appears in the IFRAME, and its page content will dynamically increase or decrease, now need to remove the IFRAME's scroll ba
Gets the elements in the IFRAME in the parent windowIE under:Format: window.frames["The name value of the IFRAME"].document.getelementbyid ("ID of the control in the IFrame"). Click (); Example: window.frames[Methods that are supported:Format: document.getElementById ("id value of iframe"). ContentWindow.document.getE
General forms are submitted through Ajax, so it's more cumbersome to run into a form with a file upload. The basic principle is to add a hidden iframe on the page, and then submit the form data in addition to the file via Ajax, and in the callback function after the form data is submitted successfully, the file is submitted separately by form, and the target of the form of the submitted file points to the hidden i
This article illustrates the method of communication between embedded IFRAME and parent page JS. Share to everyone for your reference. The specific analysis is as follows:
How the page in the IFRAME frame communicates with the main page based on whether the SRC attribute in the IFRAME is a domain link or a cross domain link, there are obviously different ways of
Http://blog.csdn.net/ime33
Without permission, shall not be reproduced.
The level is limited, welcome correction, Exchange.
Do a background page iframe frame system, share under.
IFrame all browsers support
Property:
Align specify how to align this frame based on the surrounding elements.
Frameborder whether to display a border around the frame.
Height sets the altitude of the
asp.net I found that I could try to embed an IFRAME in the initial page, then use an IFRAME to display a page, and set the IFRAME to be in absolute position, Z-index set to the highest 9999, so that the page can be overwritten on the initial interface, When the modal window needs to be displayed, the IFRAME is displaye
An IFRAME is a necessity, because using an IFRAME can cause more problems, and some browsers may set the IFRAME as an ad mask.In a recent work on the use of the IFRAME, the beginning of the problem is the IFRAME highly adaptive problem, this issue in the word of Mouth networ
In many cases, we need to change an IFRAME address (src attribute), or use the target of the form (Form) to submit in the specified IFRAME, and load the IFRAME (onload) to improve the value of Web applications. This article discusses how to listen for cross-browser IFRAME onload events.
If you do not have time to read
Recently wrote two admin backend front page, there is a management background, the left menu navigation and the right content page is two iframe, the demand is, click on the main navigation, left IFrame and the right IFRAME call different links. Personal recommendation with jquery implementation, code concise, strong scalability .jquery section:
fun
Window Category:
1.iframe
2. Window
3. dialog boxCommon methods:
1.switchTo ()
2.getWindowHandles ()Examples of IFRAME:
MU Course network path: After login homepage avatar-My course-wiki-create entries The
following figure is an iframe window
Task: Enter a paragraph of text under the iframe window: code:
Package com.w
Javascript| News
Keywords: javascript, iframe, height, Firefox
When you use an IFRAME on the page, you generally do not want the IFRAME to display unsightly scroll bars so that the contents of the IFRAME and the contents of the main page are seamless. At this point you will set the scrolling= "no" attribute. However,
1. Get an IFRAME Window objectThere are cross-domain access restrictions.
Chrome:iframeelement. ContentwindowFirefox:iframeElement.contentWindowIe6:iframeElement.contentWindow
The article IFRAMEs, onload, and Document.domain said "he iframe element object has a property called Contentdocument that contains the" IFrame ' s Document object, so and can use the Par
Embed the HTML code in the Flex component to make use of flex iframe. This is a lot of time to use, sometimes flex has to do so, if you do not do it ...Flex is also capable of JavaScript interaction with HTML, Flex calls to JavaScript methods in HTML, and gets the return value after the call.1, Flex iframe Download Address: Https://github.com/downloads/flex-users/flex-i
Find things from the internet, found that they are not suitable for their own requirements, but also a pure CSS implementation, too lazy to see, most of the time is based on JS, of course, my idea is to not use JS (this is a personal quirk, in fact, JS is nothing, after all, now more than 99% of browsers support JS). Then slowed down their own footsteps, study it yourself. Of course, this is not the most perfect, as to where is not perfect, the final will be given. This gives the code first.
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.