您现在的位置是:首页 > 电脑技术查询 > web开发

数据显示有关问题

编辑:chaxungu时间:2022-10-02 23:23:38分类:web开发

数据显示问题求助
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" />