我iframe里面是一个下拉框
在父窗体加入iframe
<iframe src="getAllDistrict.html" name="searchFytIndividualReport_unit" id="searchFytIndividualReport_unit" width="300" height="40" scrolling="no" frameborder="0"> </iframe>
src 指向的就是通过action指向的下拉页面。
我在父窗口里面调用iframe下拉框的value 和text
var childValue= window.frames["searchFytIndividualReport_unit"].document.getElementById("districtSelect").value; //select value
var selectObj= window.frames["searchFytIndividualReport_unit"].document.getElementById("districtSelect"); //select 对象
var childText = selectObj.options[selectObj.selectedIndex].text;//select text
“searchFytIndividualReport_unit” 是指定某个iframe
"districtSelect"是iframe里面下拉的id
分享到:
相关推荐
iframe页跳转父窗体
NULL 博文链接:https://skying007.iteye.com/blog/700152
通过js实现的子窗体与父窗体之间的值传递
让iframe子窗体取父窗体地址栏参数(querystring)</title> [removed] function f(){ //http://localhost:4101/MyFiles/netshop/ShopType.aspx?tid=1 var url = [removed].href;//取得地址栏 var pos = url....
NULL 博文链接:https://skying007.iteye.com/blog/1044069
基于iframe的跨域与更新父窗体地址栏的解决方案.docx
多个iframe嵌套获取嵌套中iframe中文本或者其他的值
本文实例讲述了jQuery实现iframe父窗体和子窗体的相互调用方法。分享给大家供大家参考,具体如下: 父窗体 <html> <head> <title>usually function</title> </head> <body>...
父页面得到iframe的数据和iframe页面得到父页面的数据.txt
iframe父页全屏展示iframe内页的图片
父子窗体之间传值iframe之间的相互操作,还有sturts2指定跳转的页面。
NULL 博文链接:https://terryang.iteye.com/blog/292913
父画面取得iframe内的控件值 兼容ie firefox
JavaScript实现IFrame子窗口调用父窗口的全局变量
本Demo汇总是iframe父页面与iframe子页面如何相互调用方法、元素及值的几种常见方法(含JS、JQuery方法)
如果乱码的话,,那就改一下编码,,,GB2312或者utf-8,,还乱码,那就编辑js文件在保存下保存,GB2312或者utf-8,,页面上也一致
这个库允许的高度与同跨域iframe来适应他们所...在iframe页面链接修复和支持iFrame与父页面之间的链接。 提供自定义的大小和滚动方法。 使家长地位和视口大小的iframe。 与ViewerJS支持PDF和ODF文档。 后备支持到IE8。
主要介绍了Jquery方式如何获取iframe页面中的Dom元素,需要的朋友可以参考下