velocity 实现td 中月份的多选框

    后台返回多选框月份的字符串形如"101010101010",1代表这个月选中.

 1    <td rowspan="2" colspan="3" id="smonth">
 2      #set($tdMonth="1010001010101")
 3      #foreach($e in ["01","02","03","04","05","06","07","08","09","10","11","12"])  
 4          #if($tdMonth.substring($math.sub($velocityCount,1),$math.sub($velocityCount,0))==1)
 5            $e月 <input type="checkbox" checked="checked" />
 6           #else
 7           $e月<input type="checkbox" value="$e"/>
 8           #end 
 9           #if($velocityCount%3==0)
10           <br/>
11           #end
12      #end    
13      </td>
原文地址:https://www.cnblogs.com/-xiaowu/p/4184352.html