Home > Web Front-end > JS Tutorial > Solve the problem that the js function in the iframe cannot be accessed after closing the extjs window in firefox and then opening it_YUI.Ext related

Solve the problem that the js function in the iframe cannot be accessed after closing the extjs window in firefox and then opening it_YUI.Ext related

WBOY
Release: 2016-05-16 18:58:59
Original
1005 people have browsed it

Everything works fine in IE and Google Chrome, which is very frustrating. I have tried many ways to call functions in iframe, but the problem has not been solved. I searched again on Google today, patiently browsed the search results, and finally found someone who wrote that you can use

document.getElementById('iframeid').contentWindow.myFunc();

like this I have never seen this way of writing before, so I tried this code with the mentality of treating a dead horse as a living horse doctor. A miracle happened and the medicine cured the disease. Now this method works fine in the three browsers mentioned earlier. Make a note here for future reference.

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