var obj=opener.document.all.selectID;
obj.options.add(new Option(tx,vl,true,true));

解决方案 »

  1.   

    ===========>
    <select id="selectID">
      

  2.   

    把原来的值保存在一个数组里,先清空select里面的值,然后再赋值
    window.opener.document.all.selectID.options.lenth = 0;
    for (i=0;i<Array.lenth;i++)
    {
    obj.options.add(i,Array[i]);
    }
      

  3.   

    可以在父窗口中定义一个增加option的函数,然后在子窗口中调用这个函数.
      

  4.   

    var len=window.opener.document.all.selectID.options.length;
    window.opener.document.all.selectID.options[len]=new Option(tx,vl);
      

  5.   

    var len=window.opener.document.all.selectID.options.lenth;//lenth改为length
      

  6.   

    var oOption = document.createElement("OPTION");
    oOption.text=onode.selectSingleNode("UserName").text;                  
    oOption.value=onode.selectSingleNode("UserID").text;
    document.Form1.UserList.add(oOption);