a.html 中有iframe id为ia
iframe的src为b.html
b.html中head里面包含js文件 b.js
b.js里面有js函数 bcall()
问题是在a.html中怎么调用 iframe中包含的b.js 里面的函数bcall()
iframe的src为b.html
b.html中head里面包含js文件 b.js
b.js里面有js函数 bcall()
问题是在a.html中怎么调用 iframe中包含的b.js 里面的函数bcall()
或者是给iframe加个name,然后window['name'].bcall();
</iframe>
什么是跨域呢?按照第一种方法无法调用,是不是你所说的原因呢?
document.getElementById("ia").contentWindow.bcall();