struts:
<select id="selId" style="width:210px;">
<s:iterator value="entities">
<option value="<s:property value="id" />"><s:property value="name" /></option>
</s:iterator>
</select>
spring:
<select id="selId" name="selId">
<c:forEach items="${entities}" var="entity">
<option value="${entity.id }" <c:if test="${entities.id==entity.id}"><c:out value="selected"/></c:if>>
${entity.name}
</option>
</c:forEach>
</select>
jquery : var selId = $('#selId').val();就可以获取id的值。