2012-09-30 85 views

回答

5
<div class="control-group"> 
    <%- form.label("state_or_province", false, {class: "control-label"}) %> 
    <div class="controls"> 
    <!--  <%- form.input("state_or_province") %> --> 
    <select id="Facility_state_or_province" name="Facility[state_or_province]" size="1"> 
     <% state_or_province_list.forEach(function (state_or_province_entry) { %> 
     <option value = "<%= state_or_province_entry.lookup_code %>" <%= (facility.state_or_province != null) && (facility.state_or_province == state_or_province_entry.lookup_code) ? 'selected = "selected"' : '' %>><%= state_or_province_entry.meaning %></option> 
    <% }); %> 
</select> 
    </div> 
</div> 
+2

哇。那很快!效果很好。 – mukama