Controller:
@RequestMapping({"/user"})
public void registerUser(User uu)
throws Exception
{
System.out.println(uu.getPhone());
}
jsp:
<form>
<input id="reg_username" name="phone" type="text" class="form-control" placeholder="手机号" datatype="m" errormsg="请输入手机号"/>
</form>
实体类:
public class User {
private String phone;//
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
}