html:select的取值问题
bhwhy 2007-05-09 04:30:58 我用的struts架构
jsp页面中:
<html:select property="interesting" multiple="true">
<html:option value="htmlselect.sing">Sing</html:option>
<html:option value="htmlselect.print">Print</html:option>
<html:option value="htmlselect.film">Film</html:option>
<html:option value="htmlselect.computerGame">Computer Game</html:option>
<html:option value="htmlselect.other">Other</html:option>
</html:select>
可以多选,对应的form中,我定义了一个与之对应的数组,可以自动获得值,问题是
自动获得的是我选中的value值,如:htmlselect.print,而我想要的是显示的文本值,如何得到呢。不能把value和显示文本写成一样的。
高手指点一下,分不多了,多谢。