归纳-子窗体传值到父窗体

第一种:Open
   1. 通过Opener方法调用父窗体方法传值
       
 
父窗体
  
子窗体
   2.在子窗体里面用window.opener.document.from方法传值
     
父窗体
  
Code
      
    扩展:子窗体关闭要刷新父窗体,在子窗体赋值的第一句加上opener.location= opener.location.href;
第二种:ShowModalDialog
    1.window.returnValue方法传值
      
父窗体


Code
     扩展:子窗体关闭要刷新父窗体,在打开窗体的URL后面加上 window.location.reload();
     

    
posted @ 2009-10-08 15:17  邱帆  阅读(2592)  评论(12编辑  收藏  举报