dom:<select class="time_start_hour"></select><select class="time_start_hour"></select><select class="time_start_hour"></select><select class="time_start_hour"></select>中间为select添加option选项的js语句就不贴了jsvar xxx =[12,06,08,20] var SelectArr = $(".time_start_hour");//循环select for (var i = 0; i < SelectArr.length; i++) { var select = $(SelectArr[i]); select.options[???].selected = true;//这里如何对应数组的某一项进行赋值? }
添加回答
举报
0/150
提交
取消