How can I pass the select value to the action and assign the action value to select_html/css_WEB-ITnose?

WBOY
Release: 2016-06-24 12:20:02
Original
1378 people have browsed it

How should I write this select?

<select name="student.sex" >						<option id="selected" value="<s:property value="student.sex"/>" selected="selected"><s:property value="student.sex"/></option>						<option id="unselected" value="2">女</option>					</select>
Copy after login

Take gender as an example, pass the gender to student.sex


Reply to the discussion (solution)

You directly get the id and assign the value That’s it.

You can just get the id and assign the value. When I transfer Chinese, HTTP Status 500 - Incorrect string value: 'xC3xA6xC2x8DxC2xA1...' for column 'sex' at row 1

Is it a character encoding problem? It won't be solved. .

500 is a server problem

There may be something wrong with the tag in your jsp page.
The value of your option has already used double quotes, and the s tag also uses double quotes, so student.sex will not be parsed as an orgl expression. So your sex parameter used to be a string instead of a numeric type.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template