js设置select列表中特定项为选中状态
设置select中text="paraText"的第一个Item为选中 
function jsSelectItemByValue(objSelect,objItemText) 
{ 
//判断是否存在 
var isExit = false; 
for(var i=0;i<objSelect.options.length;i++) 
{ 
if(objSelect.options[i].text == objItemText) 
{ 
objSelect.options[i].selected = true; 
isExit = true; 
break; 
} 
} 
//Show出结果 
if(isExit) 
{ 
alert("成功选中"); 
} 
else 
{ 
alert("该select中 不存在该项"); 
} 
} 
 
                    
                     
                    
                 
                    
                 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号