var count=$( "#selectid" ).find( "option" ).length; |
for ( var i=0;i<count;i++){ |
if ($( "#selectid" ).get(0).options[i].text == text) { |
$( "#selectid" ).get(0).options[i].selected = true ; |
break ; |
} |
} |