关于在jsp页面使用位运算计算的问题

<input type="checkbox" id="weekmonday" name="weekFlag" value="1" <s:if test="(record.recordCycle&1) != 0"> checked="checked" </s:if > />


必须把record.recordCycle&1用括号括起来,否则不识别,可能是运算符优先级的问题

猜你喜欢

转载自xiaoming123123.iteye.com/blog/1635841