Calling a javascript function in an iframe from its parent? [closed]
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)
精彩评论