现在的位置: 首页 > 综合 > 正文

select下拉框

2013年09月10日 ⁄ 综合 ⁄ 共 816字 ⁄ 字号 评论关闭

静态下拉框

      html标签:

      <select >
                <option value="" selected></option>
                <option value="0">使用中</option>
                <option value="1">废弃</option>
       </select>

 

       struts标签:

       <s:select  name="test"

       headerKey="-1" headerValue="select Test"
list="#{'1':'使用中', '2':'废弃'}"
value="'1' "
required="true"
       />

 

动态下拉框

      html标签:

     <logic:iterate id="Form" name="List" scope="session" >

     <html:select name="Form" property="Num">

     <html:options name="Form" collection="NumList" property="value" />

      </html:select>

      </logic:iterate>

 

       struts标签:

       <s:select list
="assortmentQueryList"
                name="storeParamBean.catalogId" listKey="catalogId"
                listValue="articleName" emptyOption="true"
                onChange
="doDetail(this.value);">
        </s:select>

 

 

1.struts标签一定要有List属性。

2.onChange事件是当下拉框值改变时,做的动作。

 

抱歉!评论已关闭.