如何将获取到的值传入<input type="radio">标签中显示?

<input type="radio" name="patient.sex" value="男" />男
<input type="radio" name="patient.sex" value="女"/>女
传入的值是<s:property value="#list.sex>
我是这么做的:
<input type="radio" name="patient.sex" value="男" <s:if test='#list.sex=="男"'>checked</s:if>/>男<input type="radio" name="patient.sex" value="女" <s:if test='#list.sex=="女"'>checked</s:if>/>女

第1个回答  2012-09-24
<input type='redio' <?php if(获取到的值=='这个readio值'){ echo selected;}?> value='readio值' >
readio值
相似回答