$("#unitCode").each(function() {
// this代表的是<option></option>,对option再进行遍历
$(this).children("option").each(function() {
// 判断需要对那个选项进行回显
if (this.value == selectStatus) {
console.log($(this).text());
// 进行回显
$(this).attr("selected","selected");
form.render('select');
}
});
})
layui select框回显问题
最新推荐文章于 2022-11-01 17:16:56 发布