获取javascript window.open/window.showModalDialog的传递值和返回值

在window.open打开的窗口中获取相应的传递值使用window.dialogArguments,而获取window.open返回的结果值使用权window.returnValue,举例如下:

     如 var retValue = window.open("cc.html","width=129px,height=134px");

         var retValue  = windowj.showModalDialog("cc.html","dialogWith:123px;dialogHeight:200px;center:yes");

        cc.html:

                  <script>

                         alert(window.dialogArguments);

                          window.returnValue = '12121';

                   </script>

    如上所述:

        其中retValue的值为12121;

你可能感兴趣的:(获取javascript window.open/window.showModalDialog的传递值和返回值)