//定义参数从表单中读取
String str;
//如表单中有score字段
str=request.getParameter("score");
double score;
//转换为double类型
score=Double.parseDouble(str);
String str;
//如表单中有score字段
str=request.getParameter("score");
double score;
//转换为double类型
score=Double.parseDouble(str);
String str;
//如表单中有score字段
str=request.getParameter("score");
float score;
//转换为double类型
score=Float.parseFloat(str);
String formValue = request.getParameter("form_name");
float FloatValue;
try{
FloatValue = Float.parseFloat(formValue);
System.out.println(FloatValue);
}catch(Exception _e){
}