Here is a brief description of the two methods, both of which operate within the b.html within the index.html without cross-domain.
such as: Index.html in the introduction of IFRAME, in the index of how to use JS to manipulate the DOM elements inside the IFRAME?
First, the a.html content introduced by index.html and IFrame is pasted.
index->
A.htm
We are writing HTML page or JSP page is, sometimes need to use the IFRAME tag in one page nested another page, and two pages some data need to interact, this time will use JS technology, call each other method,
When we need to invoke the JS method in the child page embedded in the IFrame tab in the parent page, you can use:
document.getElementById (the ID of the IFRAME
1. Select all radio buttons in the iframe in the parent window
$ (window.frames["iframe1"].document). Find ("input[@type = ' Radio ']"). attr ("Checked", "true");
2. Operation in iframe Select all radio buttons in the parent window
$ (window.parent.document). Find ("input[@type = ' Radio ']"). attr ("Checked", "true");
of the IFRAME frame
Some time ago in the solution of Ajax upload files for a while. It is certainly no problem to upload text messages directly with $.post. But it is not feasible for $.post to upload pictures directly.
Later see some of the online solutions, there are off-the-shelf Ajax upload file encapsulation method also has the use of flash. Flash is really a good way but not everyone will flash and download the ready-made method to make changes is not easy, and the file is relatively large. Finally have to s
SEO framework iframe How to optimize
A frame or frame structure (frame) Web page behaves as if a piece of a Web page remains fixed, and other parts of the information can be moved up or down through the scroll bar. Another manifestation of frame-type Web pages is that the domain name of the deep page is usually not reflected in the URL, even if you go into the Deep sub page, the URL that the browser displays is still the URL of the homepage.Its benef
Getting objects in an IFRAME
jquery doesn't seem to be able to get elements directly through the framework, but with Dom and jquery, you can get the document object for the IFRAME. With this object, it is convenient to use jquery.
The code is as follows
Copy Code
var subdoc=$ (document.getElementById (' frame1 '). contentwindow.document;
But there's going to be a prob
Select the elements in the IFRAME from the parent page:
Copy Code code as follows:
$ (' #btnCancel ', $ (' #PopFrame ') [0].contentwindow.document]
Select an element from the parent page from the IFRAME page:
Copy Code code as follows:
$ ("#PopContainer", parent.document)
The following are the solutions for other users:
We had to use the DOM method in conjunction with the JQu
Company Web project requirements are compatible with FF3,IE6/7/8. A bug under IE6 is described in this article.The project has written a package of their own pop-up layer, the principle is to dynamically add a mask layer, and then dynamically add a div (Table) layer (Do the pop-up layer PNG translucent border effect), the div dynamic add an iframe, this iframe page points to an existing HTM file.If the HTM
Use jquery to get the value of an element of the parent window in the IFRAMEWe had to use the DOM method in conjunction with the JQuery method to implement the
1. Select all radio buttons in the iframe in the parent window$ (window.frames["iframe1"].document). Find ("input[@type = ' Radio ']"). attr ("Checked", "true");
2. Operation in iframe Select all radio buttons in the parent window$ (window.parent.d
js| Data | refresh | no Refresh | page
There are a lot of topics on the Internet to discuss, but generally with IFRAME and XMLHTTP to achieve.The implementation of an IFRAME may be the most commonly seen. Many forums and chat rooms have no refreshing effect is implemented with this. But this method still can see in IE status bar to download the data progress bar, and there is refreshing data when the comput
Frame is still very popular, many places through it to achieve a special situation. For example, traditional upload, select under IE6, Proxy, Cross-domain and so on. Today, a brief description of the operation across the IFRAME, mainly using jquery to manipulate the DOM structure.
Copy Code code as follows:
Copy Code code as follows:
$ (' #read-aa '). Click (Function ()
{
var v=$ (' #aa '). Contents (). Find ('
Often used to upload the image of real-time preview of the function, the implementation of a lot, with FLASH+JS to achieve more, today I met colleagues do not want to use flash and so do not want to use the Internet plug-ins, then I gave him a solution:
Ideas:
1. Page upload picture part of an IFRAME, the IFRAME set no border without scroll bar, and the embedded page style consistent, as required to set t
Today to help a friend's girlfriend's relatives of the entire site, with the Dedecms, there is a period of time did not touch the Dede, feeling a little rusty, but fortunately the site functions generally, so spent half a day to the whole out. In the end, because the CMS Message board module is independent out, I in order to save trouble, on a page with an IFRAME directly refer to the message Board page come in, but the problem arises, that is, the he
The application of IFrame is very common, there are usually two kinds of requirements:
1, to obtain an IFRAME effect, that is, with a scroll bar, you can save a lot of suites.
2, to embed a page, to implement the framework link.
If you are not convenient to use IFRAME, you can have the following solutions:
The first requirement if we use CSS layout to implemen
, so can not support cross-domain upload, if you have to meet these two business scenarios, then try the following method, with form and iframe to achieve upload. Here's a detailed look at:
Form form Submit to IFRAME
HTML code:
The code is as follows
Copy Code
We click Submit and we can see the following request:
The file has been uploaded. Then, adding this upload
Problem description
Our SharePoint site with Excel service published Excel, need to IFrame to other systems, but the IFRAME found the error "This content cannot be displayed in a frame."
Later, the attempt to iframe other pages in other systems, the same report such errors, but SharePoint own pages, iframe their own
JavaScript implements iframe automatic height adjustment and cross-origin of different primary domain names, javascriptiframe
As we all know, JavaScript has a same-origin policy, that is, different nested iframe of the primary domain name does not allow Js communication.
For example, if I have a website that is embedded with its webpage. Then I can use iframe to
The JS cross-domain refers to the data transfer or communication between different domains via JS, such as using AJAX to request data from a different domain, or by JS to get the frames (IFRAME) of the different domains in the page. As long as the protocol, domain name, and port are any different, are considered to be different domains.The following table shows the results of relative http://store.company.com/dir/page.html homology detection:To resolv
browsers. The FIM method supports all browsers, but it is cumbersome and easy to generate browsing records. Therefore, if the browser supports window. postMessage, window. postMessage is used. Otherwise, FIM technology is used.
Window. postMessage SolutionWindow. postMessage is a new method defined in html5. this method can easily communicate across windows. Because it is a new method, it cannot be used in both old and old browsers. For example, IE6 and IE7, IE8 already support this method.
Win
(including server-side injection, client ARP injection, etc.) IE only--generally only ie afraid of such a hanging horse, so ling son take IE surgery.
Before reading this article, let's take a look at
expression;
IE5 and later versions support the use of expression in CSS to associate CSS properties with JavaScript scripts, where CSS attributes can be intrinsic attributes of elements or
Custom Properties。 This means that the CSS attribute can be followed by a JavaScript expression, and the valu
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.