前言:
用struts的标签结合<td>标签将后台数据在表格里渲染了出来,目前需求是需要将两个状态组合在一起显示
解决:通过span标签在td里的套用可以实现
<logic:notEmpty name="queryJks" property="jksbh"> <logic:notEmpty name="queryJks" property="jzsj"> <td> <span style="color:green">已记账</span> <logic:equal name="queryJks" property="jxzt" value="3"> <span style="color:green">已核销</span> </logic:equal> <logic:notEqual name="queryJks" property="jxzt" value="3"> <span style="color:red">未核销</span> </logic:notEqual> </td> </logic:notEmpty> <logic:empty name="queryJks" property="jzsj"> <td> <span style="color:red">未记账</span> <logic:equal name="queryJks" property="jxzt" value="3"> <span style="color:green">已核销</span> </logic:equal> <logic:notEqual name="queryJks" property="jxzt" value="3"> <span style="color:red">未核销</span> </logic:notEqual> </td> </logic:empty> </logic:notEmpty>
页面效果;
over