根据输出设置select的被选中值

$("#startupStatus").find("option").map(function(i) { 
      if ($('#st-status').val() == $(this).val()){
               $(this).attr("selected", true);  
             }
      });

  

原文地址:https://www.cnblogs.com/goodbeypeterpan/p/4158529.html