struts2 radio 标签:
<s:radio name="sex" list="#{'1':'男','0':'女'}"></s:radio>
生成html代码:
<label>产品是否出售:</label><br>
<input type="radio" name="sex" id="sex1" value="1">
<label for="sex1">上架</label>
<input type="radio" name="sex" id="sex0" value="0">
<label for="sex0">下架</label>
如果在action中sex设值为1:
<input type="radio" name="sex" id="sex1" value="1" checked="checked">