日期:2014-05-16  浏览次数:20389 次

数据显示问题求助
JSP有如下代码 
<tr height="30">
  <td width="110" align="right">
  <font color="red">*</font>
  年月:
  </td>
  <td width="150" align="left">
  <s:label name="dealBonusRule.effectiveMonth"></s:label>
  </td>
</tr>
  假设dealBonusRule.effectiveMonth取得值是201004 是字符类型
  但是我要在页面中显示为 2010-04 我想通过JS或者struts2标签标示出来 怎么写?

------解决方案--------------------
试试

<s:date name="dealBonusRule.effectiveMonth" format="yyyy-MM" />