访问iframe中的控件 [英] Accessing controls inside the iframe
本文介绍了访问iframe中的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须从父页面访问iframe中的控件
我已使用以下代码访问值
document.frames.frameUpload.document.document.getElementById(``hfTextKey'').value;
我在IE中工作正常,但在mozilla和chrome中却无法正常工作.<解决方案
这是一个跨浏览器解决方案,用于从iframe访问控件.
^ ]
i have to access the control inside the iframe from parent page
i have used the below code to access the value
document.frames.frameUpload.document.document.getElementById(''hfTextKey'').value;
i works fine in IE but not in mozilla and chrome
解决方案
here is a cross browser solution for accesing controls from iframe.
http://roneiv.wordpress.com/2008/01/18/get-the-content-of-an-iframe-in-javascript-crossbrowser-solution-for-both-ie-and-firefox/[^]
这篇关于访问iframe中的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文