Html: radio tag How to get the value passed

Category: Web Develop
 
shengwq66
2013-08-20 04:57:54

Sponsored Links
Source
<html:radio property="student.sex" value="${student.sex}">
</ html: radio> Men
<html:radio property="student.sex" value="${student.sex}">
; </ html: radio> Female <br>

value = "$ {student.sex}"> have kept from requestScope scope, I want to be a modify the operation, but came
not receive the value of the corresponding button is not selected men and women, how to get him is male, then the male of that button
selected, on the contrary, is a woman, then , then the woman that button to choose

Sponsored Links

fangxin1977
2013-08-20 05:14:07

//  , value="man",  ,
//  property="student.sex",  ?   logic  name ,
<html:radio property="student.sex" value="man" <logic:equal value="man" name="student" property="sex">checked="checked"</logic:equal>></html:radio> <br>
<html:radio property="student.sex" value="women" <logic:equal value="women" name="student" property="sex">checked="checked"</logic:equal>></html:radio> <br>

edi20090904
2013-08-20 05:26:46

you direct access, sex can get to the value of the selected
zhoulimin
2013-08-20 05:33:09
<html:radio property="student.sex" value="1">
</ html: radio> M
<html:radio property="student.sex" value="2">
</ html: radio> Female <br> ;

follow your wording, in fact, as long as you set in the background student.sex value of this property can be, value specified for the two men to a woman, when you back student.sex equal to 1 M automatic back-elected, on the contrary empathy! so should be able to fulfill your needs, I wonder if you understand or not
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.