request.getParameterValues()
此方法可同时获取所有的同名参数的值,返回的是个String[] 数组,且该数组的顺序和之前获取的顺序是相同的,若取出,直接遍历即可
String[] inputValues = request.getParameterValues("inputName")
if(inputValues !=null){
for (int n = 0; n < inputValues .length; n++) {
inputValues [n];
}
}
此方法尤其适合获取复选框的值