a.htm
=======
<form name=first>
<input type=text name=txt value="测试">
</form>
<a href="#" onclick="window.open('b.htm')">打开b</a>b.htm
===============
<script>
function test(){
var winc=window.open()
winc.document.write("a 中的值是:"+opener.first.txt.value)
}
</script>
<a href="#" onclick="test()">打开C</a>

解决方案 »

  1.   

        你的这两步都没错,但最重要的是如何将页面b.htm中得到的页面a.htm的txt对象传递到页面c.htm,然后对txt对象的值进行操作、或显示出来。
      

  2.   

    你在c中没有看到:a 中的值是:测试吗?
    你也可以通过<a href="c.htm?var=a中的值">来传递
      

  3.   

    <form name=first>
    <input type=text name=txt value="测试">
    </form>
    <a href="#" onclick="window.open('b.htm')">打开b</a>b.htm
    ========
    <script>
    function test(){
    var winc="c.htm\?froma="+opener.first.txt.value
    alert(winc)
    window.open(winc)
    }
    </script>
    <a href="#" onclick="test()">显示a的数据</a>c.htm
    =========
    <script>
    var valuefroma=(window.location.search).split("=")
    alert(valuefroma[1])
    </script>
      

  4.   

        这个方法我知道,是最常用的方法之一,除了POST和GET方法外还有其它方法吗?而且是传递一个对象。
      

  5.   

    再一种办法就是直接写出c.htm
    b.htm
    ===============
    <script>
    function test(){
    var winc=window.open()
    winc.document.write("<html><body bgcolor='#0099ff'>")
    winc.document.write("<script>")
    winc.document.write("把进行处理的东西写在这里!")
    winc.document.write("document.write('a 中的值是:'+opener.first.txt.value)")
    winc.document.write("</script>")}
    </script>
    <a href="#" onclick="test()">打开C</a> 
      

  6.   

    孟子E章,我知道在window.open中打开的窗口中可以用window.opener....来控制,但是我发现
    window.creator...也可以,但是我在msdn找不到有关资料,能介绍一下吗?
      

  7.   

    TO:congden(静枫)
    你在哪里看到过window的creator属性啊,我没有见过,也没有搜索到,你见到后告诉我一声!!:)window.opener在ie5.0里有Bug存在,在其他浏览器里正常!!!使用时请注意!!