newwin.document.write('<sc'+'ript>setTimeout("location.href=\'xx.htm\'", 1000);</scr'+'ipt></head><body></body></html>');

解决方案 »

  1.   

    newwin.document.write('<sc'+'ript>setTimeout("location.href=\'xx.htm\'", 1000);</scr'+'ipt></head><body></body></html>');这里
    location.href=\'xx.htm\  
    弹出的窗口newwin = open();不是xx.htm
    不能写死
      

  2.   

    setTimeout("window.location.href=window.location.href", 1000);参考一下。没有实质区别嘛.
      

  3.   

    我发现:newwin = open();后。这个newwin的this对象还是父窗体。newwin = open(); 
    newwin.document.write("<html><head><title>NewWindow</title><meta http-equiv='refresh' content='1'></head><body></body></html>");
    Refresh后:跳到父窗口;(about:blank - >parentWindows)newwin.document.write('<html><head><title>NewWindow</title>');
    newwin.document.write('<sc'+'ript>setTimeout("alert(this.location),1000);</scr'+'ipt>
    </head><body></body></html>');
    也是父窗口的文件全名(+路径);从上面判断出。open出来的windows的this对象就是父窗体;location.reload()  和 location.href的区别就在刷新的时候有没有"啪"的一声。如果你只是想得到这个声音效果的话。不如这样写:
    newwin.document.write('<html><head><title>NewWindow</title>');
    newwin.document.write('<sc'+'ript>setTimeout("alert(this.location),1000);</scr'+'ipt>></head><body><bgsound src="./pa.mid" loop="1"></body></html>');自己去找一下吧。这个pa.mid的文件。
      

  4.   

    to  chenyu17094256(小小帅):
    setTimeout("window.location.href=window.location.href", 1000);
    这样就是新弹出一个窗口了, 而我要刷新该窗口to FBug(花知):
    谢谢, 但我不是想得到这个声音效果,
    我的目的是一个父窗口弹出多个子窗口, 多个子窗口定时刷新进度条, 所以不能用location.reload(), 这样进度条就不能走了, 只能用setTimeout("location=\'弹出的子窗口名\'", 1000)这种进度条才能走
    该怎么办呢?
      

  5.   

    可以尝试使用其它方法。
    把你的需求说的详细些!我认为你那样做不可以。因为从父窗弹出的子窗口的this对象就是父窗。区分不开来。
      

  6.   

    问题解决了,谢谢FBug(花知)各位