request获取网页单选框的值

< form  action = "servlets/LoginServlet"  method = "post"  name = "login"  onclick = "return check(this);" >
< table >
     < tr >
         < td >用户名: td >
         < td >< input  name = "userid"  type = "text"  size = "15" > td >
     tr >
     < tr >
         < td >密码: td >
         < td >< input  name = "password"  type = "password"  size = "15" > td >
     tr >
     < tr >
         < td  ="2">< input  type = "radio"  name = "status"  value = "1"
             checked = "checked"  />学生   < input  type = "radio"  name = "status"
             value = "2"  />老师 td >
     tr >
     < tr >
         < td  colspan = "2" >< input  type = "submit"  value = "确定" > td >
     tr >
table >

form >

用request获取status的值从是什么啊,假设选择第一项
Java code
?
1
request.getParameter( "status" )
答案是"1"。 

你可能感兴趣的:(js与前端)