struts2标签<s:if>问题
er-ting_ai-qing
2013-12-10
html中代码:
<s:if test="discount=='1'">无</s:if> <s:if test="discount=='0.95'">9.5折</s:if> <s:if test="discount=='0.9'">9折</s:if> <s:if test="discount=='0.85'">8.5折</s:if> <s:if test="discount=='0.8'">8折</s:if> 从后台取到discount为1,是String类型的,在页面上打印一下discount,是1,前面、后面都没有空格,却不显示“无”。而其它四种情况都可以显示。怎么回事? |