xh=1  2  3  4window.opener.document.form1.xm1  xh  .value=document.a1.a2.value;这里面的 xm1  xh  该如何写?   xm11   xm12   xm13  xm14

解决方案 »

  1.   

    循环
    opener.document.getElementById("xml"+xh).value=document.getElementById("a"+xh).value;
      

  2.   

    window.opener.document.form1.xm1 xh .value=document.a1.a2.value;前面是父表单中的字段   =后面是当前页opener.document.getElementById("xml"+xh).value=document.getElementById("a"+xh).value;是同一页面  
      

  3.   

    不是有 opener吗?怎么可能是同一页
      

  4.   

    就是不同页面的  父页里面有字段  xm11  xm21  xm31   现在要在另一页面中写xh=1opener.document.form1.xm xh  value=document.getElementById("a"+xh).value;这么写?  opener.document.form1.xm xh  value  把xh作为一个变量写进去.
      

  5.   

    window.opener.document.form1["xm1"+xh].value=document.["a1"+xh].value;
      

  6.   

    window.opener.document.form1["xm1"+xh].value=document.["a1"+xh].value;写法不对
      

  7.   

    反正一个对象的子对象有两种访问方法
    parent.child
    parent["child"]
    后者支持名称拼接,我这边测试不了,你理解意思然后自己运用吧。
    window.opener.document.form1["xm1"+xh].value=document["a1"+xh].value;
      

  8.   

    function save()
    {
    这么获取xh?   request("xh")??  吗?window.opener.document.form1["xm1"+xh].value=document["a1"+xh].value;}