window.opener 主要用来打开窗体的父窗体,可以通过这种方式设置父窗体的值或者调用js方法。

例如:

1,window.opener.test(); ---调用父窗体中的test()方法

2,如果window.opener存在,设置parentForm中stockBox的值。

    if (window.opener && !window.opener.closed) {

       window.opener.document.parentForm.stockBox.value = symbol;

  }

posted on 2013-09-04 09:19  蒲公英半海  阅读(363)  评论(0编辑  收藏  举报