可以,我才问过这个问题
你找weidegong答吧
或者到
http://www.csdn.net/Expert/TopicView1.asp?id=644393

解决方案 »

  1.   

    父窗口内容:
    newwin=window.open("new.htm")
    <input type=button value="改变新窗口内容" onclick="newwin.pr.innerText='变化了吗'">在new.htm代码如下:
    <p id=pr>按一下父窗口按钮,这里将有变化</p>
      

  2.   

    对变量处理的例子
    父窗口内容:
    newwin=window.open("new.htm")
    <input type=button value="新窗口关闭倒计时" onclick="newwin.closewin=true">在new.htm代码如下:
    <p id=pr>按一下父窗口按钮,这个窗口将关闭</p>
    <script>
    closewin=false;
    wait=5;
    closeMe();
    function closeMe(){
       if (closewin){
         pr.innerText="本窗口还有"+wait+"秒将自动关闭"
         wait--;
         if (wait<0) window.close();
       }
       setTimeout("closeMe()",100);
    }
    </script>
      

  3.   

    只是一个参数
    我想模拟手机铃声下载里的那个试听的功能,就是当点击那个“试听”的链接时,
    window.open()出一个窗口,在这个窗口中播放那个midi!显示,这个midi文件的名称要传到新open的窗口内, 怎么传?
      

  4.   

    <a href=play.jsp?musicname=xy.midi>试听</a>
      

  5.   

    你在open的窗口里用:
    window.opener.xxx.value即可
      

  6.   

    <a href=javascript:window.open('listen/listen.html',null,'toolbar=no,location=no,status=no,menubar=no,width=300,height=100')>TEST</a>点击这个连接后,新窗口是打开了,可是父窗口的地址栏里是:
    javascript:window.open('listen/listen.html',null,'toolbar=no,location=no,status=no,menubar=no,width=300,height=100')
    窗口里一片空白,怎么能让你窗口的内容不变呢?
      

  7.   

    1.如果就传一个参数,可以直接使用第二个参数,如
    window.open("index2.html","smile","")
    取参数值,用window.name2.如果再多一点参数,如a=b&c=d,用
    window.open("index2.html?a=b&c=d","smile","")
    取参数值,用substr和split解析location.search3.再多一点,先存在原窗口上
    <input type=hidden name=t value=smile>
    <input type=hidden name=t2 value=laugh>
    ...
    取参数值,用window.opener.document.all.t.value
    window.opener.document.all.t2.value等
      

  8.   

    <a href=# onclick=javascript:window.open('listen/listen.html',null,'toolbar=no,location=no,status=no,menubar=no,width=300,height=100')>TEST</a>
      

  9.   

    如果用<a href=# onclick=javascript:window.open('listen/listen.html',‘name1’,'toolbar=no,location=no,status=no,menubar=no,width=300,height=100')>TEST</a>来开新窗口,window.name总是匹配不上,为什么呢?而用<a href=javascript:window.open('listen/listen.html',name1,'toolbar=no,location=no,status=no,menubar=no,width=300,height=100')>TEST</a>
    用window.name却能准确匹配
      

  10.   

    你说的匹配不上的那个:原因可能是因为,你用了中文的单引号,比较一下:
    ‘name1’<=>'name1'
      

  11.   

    不是中文单引号的问题
    只要把<a href=# onclick=javascript:window.open(……)>中的javascript前边的"# onclick="删除,即<a href=javascript:window.open(……)>其它不变就结果就正常!
      

  12.   

    <a href=# onclick=javascript:window.open('listen/listen.html',‘name1’,'toolbar=no,location=no,status=no,menubar=no,width=300,height=100')>TEST</a>中'name1'是常量。
    而<a href=javascript:window.open('listen/listen.html',name1,'toolbar=no,location=no,status=no,menubar=no,width=300,height=100')>TEST</a>中的name1中变量。
    当然值不同了,你是不是粗心了点?
      

  13.   

    这是我往这里输入的手误, 不是我代码的问题!
    不是中文单引号的问题
    只要把<a href=# onclick=javascript:window.open(……)>中的javascript前边的"# onclick="删除,即<a href=javascript:window.open(……)>其它不变就结果就正常!
      

  14.   

    方法有多种:
    test.htm
    ====================
    <script>
    var varStr= "我是Net_lover"
    window.open("a.htm#" + varStr)
    </script>a.htm
    ====================
    <script>
    function test(){
    var str2 = window.location.hash
    alert(str2.substr(1,str2.length))
    }
    </script>
    <input onclick="test()" value="单击这里得到传过来的值" type="button">
      

  15.   

    没问题呀<a href=# onclick=javascript:window.open('javascript:alert(window.name)','name1','toolbar=no,location=no,status=no,menubar=no,width=300,height=100')>TEST</a>
      

  16.   

    子窗口可以直接引用父窗口的表单域
    比方说,父窗口有一隐含域document.form.postValue.value="ddd";
    子窗口可以直接引用
    var v=opener.document.form.postValue.value;
    不需要显式传递
      

  17.   

    : qiushuiwuhen(秋水无恨) 你的这个说法欠妥:
    2.如果再多一点参数,如a=b&c=d,用
    window.open("index2.html?a=b&c=d","smile","")
    取参数值,用substr和split解析location.searchwindow.open("index2.html?a=b&c=d"……)以这种方面传进去的参数不需要substr和split解析location.search,简单的问题被你复杂化了!!!
    这种方式传进去的参数和用<a href=……>方式传进去的参数是一样的,在php里直接使用,用不着什么解析!