我用JavaScript 写了一个把一个列表框A的值添加到另一个列表框B可以实现!我现在想把B中的某一条清除,怎么做啊!  请大家帮忙!!!添加的代码是:
function AddUser_Click() 
  {
   for (var i=0 ; i<=form2.FriendList.options.length -1 ; i++)
   {
          {
            if (form2.FriendList .options [i].selected )
              {
                var element = window.Option.create(form2.FriendList.options [i].text, form2.FriendList.options[i].value,0);
                form2.ChatList.add(element);
              }                
          }  
      }
    }    删除怎么做啊!

解决方案 »

  1.   

    怎么得到啊!  我用Remove 没有成功!
      

  2.   

    你参考一下这个
    function removeElement()
    {
    try
    {
    //The first child of the div is the bold element.
    var oChild=Div1.children(0);
    Div1.removeChild(oChild);
    }
    catch(x)
    {
    alert("You have already removed the bold element.
    Page will be refreshed when you click OK.")
    document.location.reload();
    }
    }