IFrame取父窗口参数

来源:互联网 发布:八上政治行知天下答案 编辑:程序博客网 时间:2024/05/16 06:49
 父页面的ShowLotInfo方法
//显示指定批号的信息,此方法会提交父页面的
function ShowLotInfo(lotIndex)
{
//alert(lotIndex);
document.frmContract.optType.value="ShowLotInfo";
document.frmContract.lotIndex.value=lotIndex;
document.frmContract.submit();
}


IFrame 中的方法
IFrame 页面中的脚本函数
function RefreshParent()
{
var lotindex = window.parent.document.all["lotIndex"].value;
//alert(lotindex);
window.parent.ShowLotInfo(lotindex);
//window.alert('签字成功!');
}