0
如何獲取行動類中選定單選按鈕的值,struts 2?如何獲取行動類struts 2中所選單選按鈕的值?
<s:form action="vote.action" method="post">
<s:radio name="vote" list="#{'1':'Candidate1','2':'Candidate2','3':'Candidate3'}" value="2" />
<s:submit method="execute" key="label.vote" align="center" />
相同的方式,一個文本框,在具有相同名稱的行爲制定者。無論如何,在你問這裏之前,你最好在互聯網上搜索你想要做的事情,例如:http://www.mkyong.com/struts2/struts-2-sradio-radio-button-example/ =) – Pigueiras