提交form之前需要先判断select标签的值是否符合要求,怎样才能取到标签里的值呢?struts select标签中似乎没有id属性.用property好像也识别不了workFlowCfgEntity.functionID<html:select name="WorkFlowCfgForm" size="1" property="workFlowCfgEntity.functionID" >
     <option value="">
 --请选择--
     </option>
<html:options collection="lstFunctionIdRecords" property="functionId" labelProperty="functionName" />
</html:select>

解决方案 »

  1.   

    styleId应该怎么用,我刚接触java,好多东西不大知道
      

  2.   

    <html:select name="WorkFlowCfgForm" size="1" property="workFlowCfgEntity.functionID" styleId="select01">
         <option value="">
     --请选择--
         </option>
    <html:options collection="lstFunctionIdRecords" property="functionId" labelProperty="functionName" />
    </html:select>
    最后生成的就是id="select01"
    再用JavaScript处理咯
      

  3.   

    在Form里面getFunctionID就行了。