js控制select 在火狐下不报错,IE下报错。
varselectItems=$('select');//设置下拉框初始值if(selectItems!=null&&selectItems.length>0){for(...
var selectItems = $('select'); // 设置下拉框初始值 if (selectItems != null && selectItems.length > 0) { for ( var i = 0; i < selectItems.length; i++) { var se = selectItems[i]; var seValue = se.value;
se.value = seValue + ''; se.value = "false"; var options = se.options; if (options != null) { for ( var j = 0; j < options.length; j++) { var oe = options[j]; var oeValue = oe.value; if (seValue == oeValue) { oe.selected = 'selected'; break; } } } } 展开
se.value = seValue + ''; se.value = "false"; var options = se.options; if (options != null) { for ( var j = 0; j < options.length; j++) { var oe = options[j]; var oeValue = oe.value; if (seValue == oeValue) { oe.selected = 'selected'; break; } } } } 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询