开发者

Calling a javascript function in an iframe from its parent? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_开发百科 Closed 10 years ago.

How can I call a Javascript function in an iframe from its parent?


thejh, i just asked how TO call A function in AN iframe from its parent - "function in iframe", not "function in its parent". And you didn't even read the full question. Please do it next time.

By the way, the answer is as follows:

window.frames[0].doSomething(); // but be sure the iframe is loaded before calling its functions


This took just half a minute of googling. And you didn't even write a full sentence. Please do it next time.

http://www.velocityreviews.com/forums/showpost.php?p=765140&postcount=2

(by the way, this only works if the domains are the same)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜