开发者

radiobutton issue

I created a radio button using html tags like the following,

开发者_Python百科
<input type="radio"
       value="NO"
       class="check"
       name="courseType"
       <%="NO".equals(request.getParameter("courseType"))?"checked=\"checked\"":""%>
       onchange="submitForm()"/>
<label for="normal">Normal</label>

now it is working fine.Here i want to implement same scenario using struts1.2

Note: while clicking on radio button i need to submit form and it should be checked (<%="NO".equals(request.getParameter("courseType"))?"checked=\"checked\"":""%> )

here i am created using struts like the following way

<html:radio property="courseType"
            value="FE"
            onchange="subminForm()"
            styleClass="check" />
<label for="normal">Normal</label>

But how could i submit and checked the radio button...?


I think you can use struts tag libraries to solve this problem, where you will use bean to store the state of the radio button. And check the state in the struts action class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜