Java 如何将所选项目设置为只读,即它可以';struts 1中的“不可更改”下拉列表

Java 如何将所选项目设置为只读,即它可以';struts 1中的“不可更改”下拉列表,java,javascript,jquery,ajax,struts,Java,Javascript,Jquery,Ajax,Struts,如何将所选项目设置为只读,即不能通过单击sturts 1.3中的下拉菜单进行更改 我必须修复下拉列表中的选定项,用户在尝试编辑选项以选择其他选项时无法更改它 <html:select property="stdUnitId" styleId="stdUnitId" style="width:153px;" styleClass="required" > <c:forEach var="reco

如何将所选项目设置为只读,即不能通过单击sturts 1.3中的下拉菜单进行更改

我必须修复下拉列表中的选定项,用户在尝试编辑选项以选择其他选项时无法更改它

             <html:select property="stdUnitId" styleId="stdUnitId" style="width:153px;" styleClass="required"  >

                            <c:forEach var="record" items="${unitList}">
                                <c:choose>
                                    <c:when test="${record.id == SUID}">
                                        <option value="${record.id}" selected="selected">
                                            ${record.code}
                                        </option>
                                    </c:when>
                                    <c:otherwise>
                                        <option value="${record.id}">
                                            ${record.code}
                                        </option>
                                    </c:otherwise>
                                </c:choose>
                            </c:forEach>
                        </html:select>
                <%} else {%>
                    <select name="stdUnitId" id="stdUnitId" style="width:153px;" class="required" disabled="disabled">
                            <option value="">--SELECT--</option>
                                <c:forEach var="record" items="${unitList}">
                                    <option value="${record.id}">${record.code }</option>
                                </c:forEach>
                        </select>
                <%} } %>
                </td>                   
            </tr>   

${record.code}
${record.code}
--挑选--
${record.code}

您是否在选择标签中尝试了disabled=“true”?“disabled=“true”工作并感谢您的回答。@BrijeshBhatt非常感谢disable=“true”工作正常。