給下拉选项动态设置选中值

$("#unit option").each(function () {
var val = $(this).val();
var text = $(this).text();
if(val=="${model.unit}"){
$(this).attr("selected",true);
}

posted @ 2020-03-18 15:22  打代码的小超人  阅读(153)  评论(0编辑  收藏  举报