iframe 我有一个页面,然后这个页面中我引用了iframe(例如iframe中的内容是一个省市区的联动),我想在此页面获取iframe中的省市区的值怎么办,iframe中的值保存在一个hidden控件中.. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <iframe src="../demo.aspx" scrolling="no" frameborder="0" height="30px" ></iframe> <asp:DropDownList id="ddlprovice" runat="server"></asp:DropDownList> <asp:DropDownList id="ddlcity" runat="server"></asp:DropDownList> <asp:DropDownList id="ddlcountry" runat="server"></asp:DropDownList> <input type="hidden" id="lbl_provice_id" runat="server" value="330000" name="lbl_provice_id" /> <input type="hidden" id="lbl_provice" runat="server" value="浙江省" name="lbl_provice" /> <input type="hidden" id="lbl_city" runat="server" value="杭州市" name="lbl_city" /> <input type="hidden" id="lbl_area" runat="server" name="lbl_area" /> iframe页面:onchange="parent.document.getElementById('Hidd_input').value=this.value" <script type="text/javascript"> function showIfameValue() { var frame = document.getElementById('framekk'); var value = frame.contentWindow.document.getElementById('hid23').value; //frame.contentWindow.document } </script> 所指的父页面是哪个页面?demo.aspx有DROPDOWNLSIT 你想在哪儿获取到值?是demo.aspx 还是? 给iframe 取一个ID名字,然后通过这个ID可以获取到iframe 中的对象,既然获取到了对象就可以获取到值了 window.frames['嵌套的IframeID'].document.getElementById('ifame中的控件ID').value;刚刚试过了,可以!~ Repeater的颜色控制 c#读远程服务器文件内容 TreeView节点显示不同颜色 panel里面的文本框如何获得鼠标焦点 <script language="javascript"> </script>中如何调用后台的函数? C#怎么保存电子邮件 自定义webcontrol的问题(高手来呀) 奇怪问题,网站要做一计数器,Global.asax中的Session_Start好象过程不执行。2003 OS,是不是操作系统的总题? 操作数组的问题 关于自定义验证控件显示错误摘要的问题 DataSet与 TreeView 错误 Reapter控件手动设置某列值的问题
<iframe src="../demo.aspx" scrolling="no" frameborder="0" height="30px" ></iframe> <asp:DropDownList id="ddlprovice" runat="server"></asp:DropDownList>
<asp:DropDownList id="ddlcity" runat="server"></asp:DropDownList>
<asp:DropDownList id="ddlcountry" runat="server"></asp:DropDownList>
<input type="hidden" id="lbl_provice_id" runat="server" value="330000" name="lbl_provice_id" />
<input type="hidden" id="lbl_provice" runat="server" value="浙江省" name="lbl_provice" />
<input type="hidden" id="lbl_city" runat="server" value="杭州市" name="lbl_city" />
<input type="hidden" id="lbl_area" runat="server" name="lbl_area" />
onchange="parent.document.getElementById('Hidd_input').value=this.value"
function showIfameValue() {
var frame = document.getElementById('framekk');
var value = frame.contentWindow.document.getElementById('hid23').value;
//frame.contentWindow.document
}
</script>