Home >Web Front-end >JS Tutorial >JQuery and iframe interaction implementation code_jquery

JQuery and iframe interaction implementation code_jquery

WBOY
WBOYOriginal
2016-05-16 18:38:131121browse

How to find elements in the parent page in the iframe:

$('#id', window.parent.document)

How to get the elements in the iframe in the parent page:
$ (this).contents().find("#suggestBox")
Call the methods and variables defined in the parent page in the iframe:
parent.method
parent.value

Statement:
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