Iframe之间及iframe与父窗体之间值的传递

( )父窗体调用iframe子窗体的例子:
1
// 将子iframetext的值赋给父窗体中一个text
document.getElementById('applyDate').value=window.frames["capitalList"].document.all('applytime').value;
2
// 父窗体中的一个按钮onclick触发子iframeformbutton1服务器端事件
window.frames( capitallist ).document.forms.item(0).button1.click(); 或写做:
window.frames( capitallist ).document.form1.button1.click();


( )iframe子窗体调用父窗体的例子:
1
// iframe中的formbuttononclick事件给父窗体的一个text赋值
window.parent.document.all('applyDate').value=document.getElementById('applytime').value;
2
// 子页面调用父窗体的某个按钮的按钮事件
window.parent.form1.button1.click()
( )iframe子窗体之间相互调用
// 右边iframe中页面的按钮调用左边的iframe中的页面,让左边页面得以刷新
parent.frame( menu ).window.location.reload();
相关文章
相关标签/搜索