文本域: <s:textfield name="womenName" id="womenNameId" cssClass="max-length-10"/>
下拉框: <s:select list="marriedStations" listKey="CODE" listValue="NAME" name="marriedState" id="marriedStateId" headerKey="" headerValue="请选择"></s:select>
list对应集合 listKey代表传入后台的值 listValue显示内容
下拉框(带固定值)
<s:select list="#{'':'请选择','1':'第一季度','2':'第二季度','3':'第三季度','4':'第四季度'}" cssClass="required" name="quarter" οnchange="selectCheckType(this.value)" id="quarterId" ></s:select>
隐藏域
<s:hidden name="checkNum" value="%{c03Vo.checkNum}"></s:hidden>
%{c03Vo.checkNum}给隐藏赋值 c03Vo代表action中成员变量 checkNum 代表成员变量属性
<s:hidden name="yearly"></s:hidden>隐藏域做页面返回用
if语句标签
<s:if test="pIS_RESULTHEALTH.PISFIELD501==1">
<input type="radio" name="pIS_RESULTHEALTH.PISFIELD501" value="1" checked >
</s:if>
<s:else>
<input type="radio" name="pIS_RESULTHEALTH.PISFIELD501" value="1" >
</s:else>
test 代表判断真假 pIS_RESULTHEALTH代表action成员对象 PISFIELD501代表成员对象属性
url标签
<s:url id="url_pre"
value="ServiceQueryActiongetLiveServiceListResult">
<s:param name="pageNow" value="pageNow-1"></s:param>
<s:param name="dateFrom" value="dateFrom"></s:param>
<s:param name="dateEnd" value="dateEnd"></s:param>
<s:param name="counselTitle" value="counselTitle"></s:param>
</s:url>
<s:a href="%{url_pre}" >上一页</s:a>
param 代表参数名和值
ServiceQueryActiongetLiveServiceListResult代表访问的action和方法getLiveServiceListResult
struts标签取值标签
<s:property value="pIS_RESULTHEALTH.PISFIELD_FAMILYNUM"/>pIS_RESULTHEALTH代表成员对象 .PISFIELD_FAMILYNUM代表成员对象属性
iterator标签
<s:iterator value="bookList" status="status" id="a">
<s:if test="#status.index==0">
</s:if><s:else>
<tr id="prize${status.index}">
<th width="8%" height="40" nowrap>宣传品种类:</th>
<td width="20%" height="40" align="left" nowrap class="tr_s">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<s:select id="selectResType%{#status.index}" list="teachResType" headerKey="" headerValue="--请选择--" listKey="CODE" listValue="NAME"
name="bookList[%{#status.index}].PISFIELD_TEACHRESTYPE" cssClass="select1" />
</td>
</tr>
</table>
</td>
<th width="8%" height="40" nowrap>宣传品书目种类:</th>
<td height="40" align="left" nowrap class="tr_s">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30%">
<s:select id="selectBook%{#status.index}" list="books" headerKey="" headerValue="--请选择--" listKey="CODE" listValue="NAME"
name="bookList[%{#status.index}].PISFIELD_TEACHBOOKNAME" cssClass="select1" />
</td>
<td width="88%">
<input name='delete2' type='reset' class='btn_mouseout' value='删 除' οnclick="DeleteSignRow('prize${status.index}')"/>
</td>
</tr>
</table>
</td>
</tr>
</s:else>
</s:iterator>
bookList代表list集合 定义在action成员变量 status代表状态 status.index代表索引 selectBook%{#status.index} 代表id 如selectBook0 %{#status.index} 代表数字
bookList[%{#status.index}].PISFIELD_TEACHBOOKNAME代表集合中对象属性