实现代码如下:
setTimeout(function() {
var selSorts = $("select[id^='" + controls.selsort + "']");
$.each(selSorts, function(index, sort) {
var ope = $(sort).find("option[value='" + arrSort[index] + "']");
if (ope.length > 0)
ope[0].selected = true;
});
}, 1);
以上就是【jq选中select控件 无法设置selected的解决方法】的全部内容了,欢迎留言评论进行交流!