select 更改选中项
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.Ncustomer_id.options[document.myform.Ncustomer_id.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
创造了个 列表框
现在想 给某个特定的值 selected :
document.myform.Ncustomer_id.options[document.myform.Ncustomer_id.selectedIndex]
------解决方案--------------------你在说什么?你想说什么?你要做什么?
------解决方案--------------------for(i=0;i <selectObject.options.length;i++){
if(selectObject.options[i].text == "特定值 " || selectObject.options[i].value == "特定值 "){
selectObject.options[i].selected = true;
break;
}
}