日期:2014-05-17  浏览次数:20883 次

下拉列表disabled属性为什么不起作用??请高手指点!!!!!
<html>
<script       language= "JavaScript ">  
function   selectdu()  
{  
alert( "choise   is ");
var       strSel       =       document.branchForm.branchLevel.options[document.branchForm.branchLevel.selectedIndex].text;  
alert(strSel);
    if(strSel       ==       "国家 ")      
    {        
    nation.disabled       =       true;      
    province.disabled       =       true;      
    organizaiton.disabled       =       true;      
    }      
  else   if(strSel   ==   "省(州) ")    
  {      
    nation.disabled       =       false;      
    province.disabled       =       true;      
    organizaiton.disabled       =       true;      
  }  
    else   if(strSel   ==   "地、市、厅 ")  
    {
    nation.disabled       =       false;      
    province.disabled       =       false;
    organizaiton.disabled       =       true;      
    }
    else
    {
    nation.disabled       =       false;      
    province.disabled       =       false;
    organizaiton.disabled       =       false;
    }    
  }

</script>
<BODY   >
<form     name= "branchForm "   method= "post ">
                                           
<select   name= "branchLevel "   property= "ilevel "   OnChange= "selectdu() "   size= "1 "   style= "width:   210px;   height:   20 "   >  
<option   value= " "/>
<option   value=17> 国家 </option>
<option   value=18> 省(州) </option>
<option   value=19> 地、市、厅 </option>
<option   value=20> 院(处) </option>
</select>          
           
<select   name= "nation "     style= "width:210px;   height:   20 "> </select>
<select   name= "province "     style= "width:210px;   height:   20 "> </select>
<select   name= "organizaiton "     style= "width:210px;   height:   20 "> </select>
</form>
</BODY>
<