These days in doing a picture upload function, originally wanted to upload images with Ajax to achieve instant refresh, but has not been achieved, alas.
It was later implemented using an IFRAME framework, however, there is a problem with this framework, when I upload the picture after I want to upload the path back to this framework, then how to take out, I began to output the value directly to the IFRAME,
I have two iframe on a page, these two are tied, one on the left to display the person's data, a cell on the right side of the data, if the referenced page data is too large, it will be truncated, but set scrolling= "Auto", double will appear two scroll bar. Check the code on the Internet, there are probably two ways to achieve
method one. The referenced page is the static height of the JS code
Gets the static height of the contained page to set th
Many comrades on the IFRAME is how to control, not very understanding, basically still in a vague state of understanding.
Note Two items , IFR is an ID and NAME value with the presence of an IFRAME:document.getelementbyid ("IFR");window.frames["IFR"];
To use a function within an IFRAME, a variable must go through the second method. Because it takes a complete D
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
Javascript uses the contentWindow attribute to operate the dom in iframe. conte
In IE6 and IE7, we can use document.frames?id=.doc ument to access the document object in the iframe subwindow. However, this is not in line with W3C standards and is also a unique method in IE, it cannot be used in Firefox, while in Firefox, it uses a document that complies with W3C standards. getElementById (ID ). contentDocum
(Reprinted. I am too lazy to think about it. I have not tried it myself)
I believe that most Webmasters have suffered iframe Trojan attacks, and a friend's website has been injected with N times of iframe (Comment: As webmasters, I should think about why they are suspended, vulnerabilities. Moreover, it is easy to inject iframe into ARP attacks, and only the LAN
Several Methods for jquery to operate iframe
This article provides a detailed summary of several methods for using jquery to operate iframe. For more information, see.
Iframe is often used in composite documents. Using jquery to operate iframe can greatly improve efficiency. Here we collect some basic operations
DOM
In IE6 and IE7, we can use document.frames?id=.doc ument to access the document object in the iframe subwindow. However, this is not in line with W3C standards and is also a unique method in IE, it cannot be used in Firefox, while in Firefox, it uses a document that complies with W3C standards. getElementById (ID ). contentDocument method. Today, when I write an instance, I use IE8 for testing. IE8 is also a W3C-compliant document. getElementById (ID
Iii. IFRAME adaptive height by school
Why is it three?
Why is it three? First, this is really a bad topic, and second, it is because I wrote this article about IFRAME adaptive height N years ago. This problem was raised because all aspects of the problem were encountered in the project. It is necessary to summarize the problem. I hope to help you. please correct me if you have any errors.
The height of th
IFrame and Ajax comparison, IFrameAjax comparison
Speaking of comparison, I may want to introduce this product to you, but I already have a lot of understanding. Let me simply put it.
Ajax:
This is a web development technology used to create interactive web applications. It mainly uses the XmlHttpRequest object. This object was first introduced in Internet Explorer 5. It is a technology that supports asynchronous requests. In short, XmlHttpRequest all
IFrame is often used in compound documents, using jquery to manipulate the IFRAME can greatly improve efficiency, here to collect some basic operations, the need for friends can refer to.Dom Method:Parent window Action iframe:window.frames["Iframeson"].document//If the ID of the IFRAME is IframesonIFrame Operation parent window: window.parent.documentjquery Metho
First of all, the IFRAME communication is divided into: same-domain communication and cross-domain communication.
First, the same domain communication
The so-called same domain communication refers to the a.html page nesting iframe under http://localhost/demo/iframe/iframeA.html
For example: document.getElementById('iframeA').contentWindow.b(); this method, w
1, JS in the child window to get the parent window windowsWindow.parentAt this point you can call the window method of the parent windows, such as getting the height of the parent window window.parent.innerHeight, width window.parent.innerWidth, mobile location of the parent window, etc., specific to see my blog " Get the size of the browser window and some action on the browser window.2, JS in the parent window to get child windows window$ ("#testiframe") [0].contentwindow==document.getelementb
Iframe automatically obtains the onload height and width, and iframe is automatically loaded. The specific implementation is as follows. If you are interested, refer to iframe to automatically obtain the onload height and width.
The Code is as follows:
Function AutoResize (iframe){// FirefoxIf (
1. IFRAME Definition and usageThe IFRAME element creates an inline frame (inline frame) that contains another document.The difference between HTML and XHTMLIFRAME elements are not supported in the HTML 4.1 Strict DTD and XHTML 1.0 Strict DTD.Tips and Comments:Tip: You can place the required text between IFRAME tags are paired and end with Content within the
IFrame is often used in compound documents, using jquery to manipulate the IFRAME can greatly improve efficiency, here to collect some basic operations, the need for friends can refer to the followingDom Method:Parent window Action Iframe:window.frames["iframeson"].documentIFrame Operation Parent Window: Window.parent.documentjquery method:Manipulate all input boxes in the selected
1. IFRAME definition and usageThe IFRAME element creates an inline framework (intra-row framework) that contains another document ).Differences between HTML and XHTMLIFRAME elements are not supported in HTML 4.1 strict DTD and XHTML 1.0 strict DTD.Tips and notes:Tip: You can place the required text between The IFRAME tag appears in pairs, starting with The conten
This article introduced the JS implementation stretch drag iframe specific code, the need for friends can refer to
Left IFrame put tree directory, the right side of the IFRAME on the index page. Drag the mouse to control the width and height of 2 iframe simultaneously.Expect someone to improve.How to: The mouse point
Many of the methods provided on the Web are to determine whether the current window is the same as the top window.
The code is as follows
if (top!=this) {
Processing when in frame
}
But this script does not differentiate between frame and IFRAME.
There are strange problems with IE when using scripts: pages are normal only in the case of an IFRAME problem frame. And it's normal in both Firefox and Chro
// obtaining a child iframe from the Window object var // Get the second iframe (get using window.frames[' XXX by name)) if // ie_frame = window.document.frames[1];} // gets an element in the IFRAME $ (' #xxxid '// Gets the parent window object in the IFRAME // =======JavaScript gets 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.