比如:a弹出b
bwindow_nm=window.open(YourURL,"window_nm");
a内控制b;bwindow_nm.YourControl_In_B;
b内控制a:window.opener.YourControl_In_A;

解决方案 »

  1.   

    这种方法我试过了,
    a内控制b:如果b是从本机上的文件打开的窗口就可以成功
              如果b是internet上的一个网址就行不通了
      

  2.   

    这是因为从 parent_window  弹出一个窗口 new_window 后,焦点自动就转移到了 new_window, 所以这时你应该在 new_window 中调用 parent_window, 然后引用 parent_window的方法对 new_window进行控制。
      在 new_window 中调用 parent_window的方法是:
        window.opener 或window.parent
      假如控制方法是control(), 那么可以写成:
        window.opener.control() 或 window.parent.control()以下是window对象的属性和方法参考:Properties 
    .defaultStatus Reflects the default message displayed in the window's status bar .frames An array reflecting all the frames in a window .length Reflects the number of frames in a parent window .name Reflects the windowName argument .parent Refers to a window containing a <FRAMESET> tags .self Refers to the current window .status Specifies message to display in the window's status bar .top Refers to the top-most Navigator window .window Refers to the current window .document Refers to the document on display within the window .frame Refers to an independently-scollable frame created with a <FRAME> tag .location Contains information on the URL of the document displayed in the window 
    Methods 
    .alert("msg") Displays a JavaScript alert message box with msg and OK button .close() Closes the window confirm("msg") Displays a JavaScript confirm message box with msg and OK and Cancel buttons .open("URL", "windowName", ["windowFeatures"]) Opens a window displaying URL with windowName as target name and optional windowFeatures prompt("msg",["default"]) Displays a JavaScript prompt box with msg and optional default text timerID = setTimeout(exp,msec) Delays execution of expression msec milliseconds clearTimeout(timerid) Cancels timerid created by setTimeOut() 
      

  3.   

    你还没有说清楚我的问题,我想知道新窗口打开的如果是本地的htm文件就可以进行控制,如果打开的是internet网址为什么就不能控制了呢
      

  4.   

    因为你没法对internet上的htm进行编程控制呀。