0
我有一个select的文本,需要找到相应的选项值。 我需要去,因为你要求的项目不选择通过文本查找选项值
for (var i = 0; i < combo.length; i = i + 1) {
if (combo.options.text == text){ // if the text value of the combo equals my variable
var pref = combo.options[combo.selectedIndex].value;
alert(pref);
}
}