jsp默认选中下拉框某一项

<select id="salesInventory_${s.index}" style="width: 98%;">

                        <option value="">-请选择-</option>

                        <c:forEach var="salesInventory" items="${salesInventoryList}">

                            <option value="${salesInventory.propertyCode}"

                                <c:if test="${salesInventory.propertyValue=='备件库存'}">selected</c:if>>${salesInventory.propertyValue} 

                            </option>

                        </c:forEach>

                    </select>

猜你喜欢

转载自blog.csdn.net/weixin_42998647/article/details/81783288