Home > Web Front-end > JS Tutorial > body text

JQUERY Example of obtaining objects in IFrame and obtaining objects in its parent window_jquery

WBOY
Release: 2016-05-16 17:25:16
Original
1203 people have browsed it

In web development, iframes are often used. It is inevitable that you need to use elements in the iframe in the parent window, or use elements in the parent window in the iframe
Get elements in the iframe in the parent window

Format: $("#iframe's ID").contents().find("#iframe's control ID").click();
Example: $("#ifm").contents ().find("#btnOk").click();

Get the element of the parent window in the iframe
Format: $('#Element ID in the parent window', parent.document) .click();
Example: $('#btnOk', parent.document).click();

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template