<s:iterator>标签的使用
2017-09-12 15:34
323 查看
<s:iterator value="news1" var="n" status="status">
<tr align="center" <s:if test="#request.status.index%2!=1">style='background-color:#7FFF00'</s:if>>
<td><input type="checkbox" name="subBox" value="<s:property value="id" />"></td>
<td><s:property value="newsid" /></td>
<td><s:property value="title" /></td>
<s:if test="context!=null">
<td><s:property value="context" escapeHtml="false" /></td>
</s:if>
<s:else>
<td></td>
</s:else>
<td><s:property value="newsman" /></td>
<td><s:date name="newsdate" format="yyyy年MM月dd日" /></td>
<td><img alt="图片" src="<s:property value="pic"/>" /></td>
<td><a
href="NewsAction/deleteNews.action?id=<s:property value="id"/>"
class="dele" onclick="return confirm('确认删除吗?')">删除</a></td>
<td><a
href="NewsAction/toUpdateNews.action?id=<s:property value="id"/>"
class="upda">修改</a></td>
</tr>
</s:iterator>
<tr align="center" <s:if test="#request.status.index%2!=1">style='background-color:#7FFF00'</s:if>>
<td><input type="checkbox" name="subBox" value="<s:property value="id" />"></td>
<td><s:property value="newsid" /></td>
<td><s:property value="title" /></td>
<s:if test="context!=null">
<td><s:property value="context" escapeHtml="false" /></td>
</s:if>
<s:else>
<td></td>
</s:else>
<td><s:property value="newsman" /></td>
<td><s:date name="newsdate" format="yyyy年MM月dd日" /></td>
<td><img alt="图片" src="<s:property value="pic"/>" /></td>
<td><a
href="NewsAction/deleteNews.action?id=<s:property value="id"/>"
class="dele" onclick="return confirm('确认删除吗?')">删除</a></td>
<td><a
href="NewsAction/toUpdateNews.action?id=<s:property value="id"/>"
class="upda">修改</a></td>
</tr>
</s:iterator>
相关文章推荐
- <s:iterator>标签内使用<s:if>判断条件
- Mybatis传单个参数和<if>标签同时使用的问题及解决方法
- Struts2中<s-if>和<s-iterator>标签的使用
- zf-关于<ww:iterator /> 标签中的<td /> 标签添加序号问题
- html中如何使用<a>标签发送post请求
- mybatis中的<collection>标签使用说明
- <c:catch>标签的使用
- <s:iterator>和<s:if>结合使用
- Struts标签-使用<s:iterator>迭代遍历集合中的集合
- Struts2中<s-if>和<s-iterator>标签的使用
- 使用自定义标签模拟jstl的<c:for each>标签
- <img>标签加入onerror事件,如果没有找到图片,则使用默认图片
- 使用HTML5的<vedio>标签插入视频,兼容主流浏览器
- <c:forEach>标签的使用方法
- 【SpringMVC】<context:include-filter>和<context:exclude-filter>使用时要注意的地方 在Spring MVC中的配置中一般会遇到这两个标签,作为<
- <s:text/>标签的使用
- <s:if></s:if>标签使用
- Struts 2 中的<s:select>标签的使用和介绍
- HTML中的<meta>标签的使用详解
- Struts2<s:iterator value="" var="lst">中var的使用和一些标签的使用体会