I have one html opennin开发者_开发知识库g inside an iframe.One javaScript function is defined there say getSomething().Now in the parent page I have one external javaScript file.Is it possible for me to access getSomething() from the external javaScript file ?
As long as both URLs are from the same domain, you can do it. Try calling something similar to the following from the external script file:
document.getElementByID("ReferringiFrame").getSomething();
精彩评论