1. Look here (change server configuration)Http://www.cr173.com/html/16696_1.html2. Use object to simulate an IFRAME without using the IFRAME frameworkhtml>head>metahttp-equiv="content-type"content="text/html;charset=gb2312"/>metahttp-equiv="Content-Script-Type"Content="text/javascript"/>metahttp-equiv="Content-Style-Type"content="text/css"/>metahttp-equiv="Author" content="Langtse"/>title>使用Object实现
In the work to embed the IFRAME in HTML and invoke the JS method in it.The demo on the web is called JS in the IFrame in the method of one click event in HTML.When the trigger is clicked, the IFrame is already rendered, so it is possible to do so.Now I have the situation is that without any action, the HTML loaded after the call to the
There are roughly two traditional approaches:Method one, after each contained page in its own content loaded, execute JS to get the height of this page, and then to sync the parent page of the iframe height.Method Two, in the main page iframe in the OnLoad event to execute JS, to get the content of the page contains the height, and then go to sync height.In terms of code maintenance, method Two is better th
The parent window operates iframe:window.frames["Iframechild"].document//If the IFRAME ID is iframechild
To manipulate the parent window in a child window: window.parent.document
So, how do we use jquery to get an IFRAME if we want to use jquery? Here is a collection of methods.
The object that gets the page is actually the selector for jquery outside the DOM method:
The parent window operates
As we all know, in the case of different domains can not send AJAX requests, the browser will report the following error:
At the same time, there is no cross-domain communication in the embedded IFrame, that is, the IFRAME in different domains cannot read data to each other (of course, the hash change can be used to pass data from the parent window to the sub iframe
Today engaged in a login page, by another site with an IFRAME embedded in, dead and dead can not log in (ie is only in the case of this situation).
It is obvious that the session cannot be saved. But directly in the address bar to open the login page, everything is normal AH. That's weird.
Search the Internet for a moment. It is true that many people have mentioned this problem. The final workaround is to add the following code to the login page:
Th
The functions of Frame and Iframe are basically the same, but Iframe is more flexible than Frame. This article will explain the differences between iframe and frame, if you are interested in the differences between iframe and frame, you can start learning. Note that HTML5 does not support frame, and
1, jquery operation of the elements in the IFRAME (2 ways)
var str = $ (window.frames["iframe"].document). Find ("#ljiong"). html ();
var Stk = $ ("#iframe"). Contents (). Find ("#ljiong"). html ();
2, the operation of the parent interface elements (header: The ID of an element)
$ (' #header ', parent.document). text ();
3. JS calls the JS function in the
Requirements DescriptionLast week received a new project, the mobile side needs to do a bottom with five navigation, click on different navigation page body display different pages, two pages are done by themselves, while the other three pages refer to another three URLs, of which two URLs are internal items and the other one is external (involving cross-domain).ProblemConsider repeatedly after the most time-saving cost is the use of IFRAME, although
// History
//------------------------------------------------------------------
// Jan 23,200 4: fixed problems which caused the script not to work in
// Some framed situations. Improved browser support.
// Added easier "addhandle" implentation.
// May 25,200 3: added Better event position detection, added caching
// Of IFRAME object references to avoid lookups. Added
// 'Move 'cursor to handles.
// May 24,200 3: Updated to fix bug with Netscape 7.x
/
Transferred from: http://www.jb51.net/article/15780.htmFor the self-adaptive height of the code there are many, the efficiency of what the consideration comes in good code is rare, but the idea is almost the same!An IFRAME without a border because it can be combined seamlessly with the Web page to update the page's part of the data without refreshing the page, but the size of the IFRAME is not like a layer
Recently involved in the development of a project, because the project is a large browser-based client (RIA) application, the page calls a lot of IFRAME. Late test found that browser memory has been high, and open the IFRAME page more memory footprint, especially in the IE series browser. All open iframe pages even closed, memory usage has not significantly decre
Throughout the current site, the original speed is a little slow, but almost every page to put what banner, column pictures, copyright, such as a lot of similar things, of course, for the unity of the website style, the need for advertising effect, this is understandable, but after all, let the user's wallet for these "embellishment" of things "increasingly lost money gaunt", Is there a way to let these same things download once after downloading, but only to download the content has changed the
IE5.5 begins to support transparent content of floating frames. If you want to define transparent content for a floating frame, the following conditions must be met.1. The Allowtransparency Label property used with the IFRAME element must be set to true.2. In the iframe content source document, the bgcolor label property of the Background-color or BODY element must be set to transparent
Copy Code code
]. scrollleft=10000 'Driver.execute_script (JS1)# JS Processing iframe# JS processing iframe does not need to switch to the IFRAME first, then cut back the operation. It can be freely operated back and forth on the IFRAME and on the main page-----This is the power of JS.JS = ' document.getElementById ("Editor_edit_edit
In web development, an IFRAME is often used, inevitably encountering elements that need to be used in an IFRAME in the parent window, or that use the parent window in an iframe frame.
Get the elements in the IFRAME in the parent window
Format: $ ("#iframe的ID"). Contents ()
1, IE-specific (through the frames Index image positioning): Document.frames[i].document.getelementbyid (' element id ');
2, IE-specific (through the name image of the IFRAME positioning): document.frames[' iframe name '].document.getelementbyid (' element id ');
The above method not only applies to the IFRAME, but also applies to the frame in the frameset. IE
This article illustrates the method of calling the function in the IFRAME frames page in Javscript, this method is very simple, with this method we can achieve the value or modify the value of the IFRAME, the operation is very simple. Share to everyone for your reference. The implementation methods are as follows:
To access the functions within the IFRAME:
iframe Adaptive Size
1, without the border of the IFRAME because it can and the seamless combination of web pages so that without refreshing the page in the case of only updating part of the page data become possible. But in the size of the IFRAME can not be as "scalable", so the use of trouble, to the IFRAME set the h
Copy Code code as follows:
I think about how to solve the Cross-domain Ah! Then went to the Internet to search for a sudden epiphany
Specifically as follows I'm copying it. Everyone focus on understanding the realization of the idea:
question:
A domain name under the page a.htm through an iframe embedded in the B-Domain page b.html, because the size of the b.html is unpredictable and will change, so need to a.htm in the
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.