一般使用:
<html:select property="region">
<html:option value="上海">上海</html:option>
<html:option value="宁波">宁波</html:option>
</html:select>
结合<html:options>使用:
<html:select property="type" >
<html:options collection="
list" property="value" labelProperty="label" />
</html:select>
java代码初始化:
Vector v = new Vector();
v.add(new LabelValueBean("宁波银行", "860010030210106"));
v.add(new LabelValueBean("临沂商行", "860010030210105"));
v.add(new LabelValueBean("华势", "860010030210001"));
request.getSession().setAttribute("
list",v);
混合使用:
<html:select property="region">
<html:option value="上海">上海</html:option>
<html:option value="宁波">宁波</html:option>
<html:options collection="
listRegion" property="value" labelProperty="label"/>
</html:select>
java代码初始化listRegion :
Vector v = new Vector();
List list = this.getJournalService().getRegionList(sql);//查库
for(int i=0;i<list.size();i++){
String temp=((Region)list.get(i)).getRegion();
v.add(new LabelValueBean(temp, temp));
}
request.setAttribute("
listRegion", v);
分享到:
相关推荐
<html:select>: 选择默认值
html:select>标签的用法 <html:select property="theChoice"> <html:options collection="choiceLists" property="value" labelProperty="description" /> </html:select>
每对<select>和</select>中至少应包含一对<option>和</option>。 说明 标记名 常用属性 描述 <select> size 指定下拉菜单的可见选项数(取值为正整数)。 multiple 定义multiple="multiple"时,下拉菜单将具有多项...
<xsl:variable name="testDetailsFilter" select="if ($testNgXslt.testDetailsFilter) then $testNgXslt.testDetailsFilter else 'FAIL,PASS,SKIP'"/> <xsl:variable name="chartWidth" select="round(600 * ...
省:<select id="Select1"></select> 市:<select id="Select2"></select> 区:<select id="Select3"></select> <script type="text/javascript"> addressInit('cmb', 'cmbCity', 'cmbArea', '陕西', '宝鸡市', '...
</select>页 <c:if test="${pageNumber<totalPages}"> <a href="Posts?pageNumber=${pageNumber+1}">下一页</a> </c:if> <a href="Posts?pageNumber=${totalPages}">末页</a> </form> </body> </html>
<select name="zhuanye"id=zhuanye> <option value="计算机科学与技术"selected>计算机科学与技术</option> <option value="网络工程">网络工程</option> <option value="物联网">物联网</option> <option value=...
<td>用户类型:</td> <td> <select name="type"> <option value="0">---请选择---</option> <option value="club">会员</option> <option value="admin">管理员</option> </select> </td> </tr> <tr> <td...
1. <s:head/>-----在<head></head>里使用,表示头文件结束 2. <s:hidden></s:hidden>-----隐藏值 I: 1. <s:i18n name=""></s:i18n>-----加载资源包到值堆栈 2. <s:include value=""></s:include>-----包含...
<select name="currentPage" onchange="test()" id="currentPage"> <c:forEach begin="1" end="${sessionScope.countPage}" var="page"> <c:choose> <c:when test="${sessionScope....
<html:select property="temp" size="1" onchange="document.forms[0].submit()"> <c:forEach var="pagetype" begin="1" end="${page.totalPages}"> <html:option value="pagetype" ><bean:...
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Eval("KeyName") %>' CommandName="select" CommandArgument='<%# Eval("KeyId") %>'></asp:LinkButton> <asp:Label ID="Label5" ...
户 口 所 在 地:<select name="province1"></select><select name="city1"></select><select name="area1"></select><br> 工 作 所 在 地:<select name="province2"></select><select name="city2"></select>...
SelectCommand="SELECT [forumname], [forumcount], [manager], [id] FROM [bbscategory]"></asp:SqlDataSource> </td> </tr> </table></td> </tr> <tr> <td valign="middle" bgcolor="#7DBEFF" style=...
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br><html><br> <head><br> </head><br> <body><br> <table><br> <tr><br> <td><%@ include file="../menu.txt"%><br> </td><br> </tr>...
</SCRIPT> <BODY STYLE="font-family:Arial"> <B>Changing Background Colors</B> <BR> <FORM> <SELECT SIZE="8" onChange="bgChange(this);"> <OPTION>Red <OPTION>Orange <OPTION>Yellow ...</HTML>
<html:select>生成HTML<select>元素 <html:option>:生成HTML<option>元素 <html:options>:生成一组HTML<options>元素 <html:optionsCollection>生成一组HTML<options>元素
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request....
<UL>{PE.DataSource id="InfoList<XSL:VALUE-OF select="NodeID" />" datasource="图片栏目循环列表信息" nodeArray="<XSL:VALUE-OF select="arrChildID" />" parentId="<XSL:VALUE-OF select="$parentId" />" ...
C#编程经验技巧宝典源代码,目录如下:<br>第1章 开发环境 1<br><br>1.1 Visual Studio开发环境安装与配置 2<br><br>0001 安装Visual Studio 2005开发环境须知 2<br><br>0002 配置合适的Visual Studio 2005...