window.open() 父子页面的传值问题

if(window.opener){//判断是否有父窗口,即打开本页面的窗口  
    window.opener.location.reload();//刷新父窗口  
    window.opener.close();  //关闭父窗口  
 
实现无刷新传值
 
在父页面里写下:
 
$('#YuYueBH').click(function(){
var YuYueBH=$('#YuYueBH').val();
if(YuYueBH==''){
window.open("yuyue_bianhao.asp","yuyue_bianhao","width=895,height=503,modal=yes,
top=242,left=215,toolbar=no,location=no,directories=no,status=no,menubar=no,
resizable=no,scrollbars=yes");
}
})
然后,在子页面里:
$('.recordRow').live('dblclick',function(){
var bianhao=$(this).attr('lang');
window.opener.document.all.YuYueBH.value=bianhao;//向info_add.asp的预约编号那里传值
})
原文地址:https://www.cnblogs.com/Damon-Luo/p/6210702.html