在后台查询下拉或构成下拉框列表数据,存放request中返回jsp,然后如下初始化(自己改改看)
<span>User Type:</span>
<span>
<select id="userType">
<option value=""></option>
<c:forEach items="${sysRoleList }" var="one">
<c:if test="${one.role_status==1 }">
<option <c:if test="${one.role_code == userType}">selected="selected"</c:if> value="${one.role_code}">${one.role_name}</option>
</c:if>
</c:forEach>
</select>
</span>