试试使用document.getElementByid("id")来取得select

解决方案 »

  1.   

    <select name="ComboOption" id="combooption" style="width:200" size="1" class="FONTStyle"> 
    </select>
    <script language="javascript"> 
    if(document.all.ComboField.value==0) 

        document.all.ComboOption.add(new Option("is",1)); 
    document.all.ComboOption.add(new Option("is not",2)); 
    document.all.ComboOption.add(new Option("starts with",3)); 
    document.all.ComboOption.add(new Option("does not start with",4)); 
        document.all.ComboOption.add(new Option("ends with",5)); 
        document.all.ComboOption.add(new Option("does not end with",6)); 
        document.all.ComboOption.add(new Option("comes before",7)); 
    document.all.ComboOption.add(new Option("comes after",8)); 
    document.all.ComboOption.add(new Option("comes before or is equal to",9)); 
    document.all.ComboOption.add(new Option("comes after or is equal to",10)); 
    document.all.ComboOption.add(new Option("cantain",11)); 
    document.all.ComboOption.add(new Option("does not contain",12)); 
    document.all.ComboOption.add(new Option("is null",13)); 
    document.all.ComboOption.add(new Option("is not null",14)); 
    document.all.ComboOption.add(new Option("is empty",15)); 
    document.all.ComboOption.add(new Option("is not empty",16)); 

    </script> 
      

  2.   

    function DelTabelRow(obj)
    {
        var clickedRow=obj;
        clickedRow.parentNode.removeChild(clickedRow);
    }
    function AddNullInfo()
    {
        var i=0;
    var newTr=FilterInfo.insertRow();
    var newTd0 = newTr.insertCell();  
    //Set TableCell's properties
    newTd0.innerHTML = '<input type="button" id=\"removeBtn\" value="Remove" onClick=\"javascript:DelTabelRow(this)\">'; //只要加上这句就出错,为什么呀?
    var newTd1 = newTr.insertCell();       newTd1.innerHTML= '<input type="button" id="DownBtn" value="^" style="width:30px;height:25px;">';  var newTd2=newTr.insertCell();
    newTd2.innerHTML='<input type=\"button\" id="UpBtn" value="V" style="width:30px;height:25px;">';
    var newTd3=newTr.insertCell();
    newTd3.innerHTML='<select name="RelSel"><option value="">-Null-</option><option>AND</option><option>OR</option></select>';
    var newTd4=newTr.insertCell();
    newTd4.innerHTML='<select name=\"KuoSel\"><option>(</option><option>((</option><option>(((</option><option>)</option><option>))</option><option>)))</option></select>';
    }