window.opener.myform.username.value=this.value;
试试看

解决方案 »

  1.   

    //parent.html
    <form>
    <input type=text id=txt name=txt ondblclick='showChild();'>
    <script>
    function showChild()
    {
      window.open("child.html","","");
    }
    </script>
    </form>//child.html
    <form>
    <input type=text id=txt name=txt ondblclick='closeChild();'>
    <script>
    function closeChild()
    {
      var parent=window.opener;
      if (parent==null) return;
      parent.document.getElementById("txt").value=document.getElementById("txt").value;
      parent=null;
      window.close();
      return true;
    }
    </script>
    </form>
      

  2.   

    可以用一个全局变量操作
    或者在主页面中加一个 sub
    public sub setval(str)
    me.text1.text=str
    End sub
      

  3.   

    可以用一个全局变量操作
    或者在主页面中加一个 sub
    public sub setval(str)
    me.text1.text=str
    End sub
      

  4.   


    没问题,动态的多个可以的,从数据库中取出来的多个对吧,然后点击另一个page就可以得到点击的value。参考我的
    页面1--page1.jsp
    <form name=form1 action="" method="post">
    <input type="text" name="t1">
    <input type="button" onClick="javascript:window.open('page2.jsp');">
    </form>
    页面2--page2.jsp
    <form name=form2 action="" method="post">
    <%
    int i=0;
    while(i<5)
    {
    i++;
    %>
    <input type="text" name="<%=i%>">  
      <input type="button" onClick="insert(<%=i%>)">
    <%
    }
    %>
    </form>
    <script>
    function insert(m)
    {
    window.opener.document.form1.t1.value = (document.getElementsByName(m)[0].value)}
    </script>
      

  5.   

    这个也只能把数据传递到父页面t1的文本框中。如果是有t5呢。如果我的光标停留在第三个文本框,我就让值传给它。并不是传给固定的那一个文本框t1,这个form1.(textname).value要有我的光标决定