IE8下select设置selected不起作用,请高手指点下
http://www.w3school.com.cn/tags/att_option_selected.asp
ie8下不行啊,别的浏览器都可以
代码都没有谁知道你做了什么操作。设置某个option选择可以直接设置select的值就行,不需要设置option的selected
selectID.value='option中某个值'
if (json.table.length > 0) {
$.each(json.table, function (idx, item) {
if (item.un_id == $("#hidunitid").val()) {
$("#sel_unit").append("" + item.un_name + "");
} else {
$("#sel_unit").append("" + item.un_name + "");
}
})