<input type="submit" value="<#if (testModel.id==0)>添加<#else>修改</#if>"/>
html编写报错:Start tag (<input>) not closed.
Multiple annotations found at this line:
- Invalid character used in text string (<#if (testModel.id==0)>添加<#else>修改</#if>"/> </
#if> ).
难道不能直接这样用吗?为什么<#if>第二个“>”是黑色,而不是绿色?
------解决方案--------------------
Multiple annotations found at this line:
- Invalid character used in text string (<#if (testModel.id==0)>添加<#else>修改</#if>"/> </
#if> ). 这错误提示 你为什么会有2个 </ #if>结束标签
------解决方案--------------------
<input class="ipt" name="bean.startTime" id="startTime" value="<#if (bean.startTime)?exists>${bean.startTime?string('yyyy-MM-dd')}</#if>" style="width:73px;" readonly onClick="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}'})"/> 至 <input class="ipt" name="bean.endTime" id="endTime" value="<#if (bean.endTime)?exists>${bean.endTime?string('yyyy-MM-dd')}</#if>" style="width:73px;" readonly onClick="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}'})" /> 我以前的代码充斥着这种写法 没问题的