Home  >  Article  >  Web Front-end  >  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
WBOYOriginal
2016-05-16 18:58:59978browse

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.

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