function selSelSingle( list, value ) { for ( i=0; i<list.options.length; i++ ){ if ( list.options[i].value == value ){ list.options[i].selected=true; break; } }
} //描述: 根据数组初始化列表框 function selList( item, arr ) {
var curIndex, insIndex, val, text; var arrItem = new Array();
if ( item ){
item.length = 0; curIndex = 0;
for ( i=0; i<arr.length; i++ ){
item.length ++; insIndex = item.length - 1;
if ( arr[i] ){ arrItem = arr[i].split( ", " ); text = arrItem[1]; val = arrItem[0]; item.options[ insIndex ].text = text; item.options[ insIndex ].value= val; } }