急~~~~~~~~求助两个iframe之间传值问题
主页面之间有两个iframe 这两个iframe之间怎么相互传值呢???(在做个项目需要iframe间的传值)
求详解~~~ 在线等(最好附上代码 iframe JS 初学 谢谢 3Q)
[解决办法]
iframe中通过parent得到主页面,然后通过getElementById方法获取指定的iframe就行了
如iframe1中获取iframe2中id为txt的输入控件
var txt=parent.document.getElementById('iframe2的id').contentWindow.document.getElementById('txt');