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

js gets the element and variable values ​​​​in the html iframe_javascript skills

WBOY
Release: 2016-05-16 16:42:50
Original
1079 people have browsed it

Last week I wanted to get the elements and js variable values ​​​​in the iframe, but I couldn’t get it. I checked the information and found out:

You cannot use the $(document).ready() method, but you must use the $("#iframeId").load() method. You can only obtain it after the iframe is loaded.

Get the js variable value in iframe:

document.frames['x'].y
Copy after login

That’s it.

Hey, it’s a very simple question, it took a long time, it shouldn’t be!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!