jsp问题request.getParameter
if(request.getParameter("l_jiage")!=""&&request.getParameter("h_jiage")!=null){l=Inte...
if(request.getParameter("l_jiage")!=""&&request.getParameter("h_jiage")!=null)
{
l=Integer.valueOf(l_jiage);
h=Integer.valueOf(h_jiage);
if(l>h)
{
out.print("输入价格有误");
}
else
{
sql="select * from hw where hw_cash>'"+l+"' and hw_cash<'"+h+"' order by hw_cash ASC";
rs=mdb.executeQuery(sql);
}
}
request.getParameter("l_jiage")这个值不为空request.getParameter("h_jiage")这个值为空为什么能执行到里面去呢
null 展开
{
l=Integer.valueOf(l_jiage);
h=Integer.valueOf(h_jiage);
if(l>h)
{
out.print("输入价格有误");
}
else
{
sql="select * from hw where hw_cash>'"+l+"' and hw_cash<'"+h+"' order by hw_cash ASC";
rs=mdb.executeQuery(sql);
}
}
request.getParameter("l_jiage")这个值不为空request.getParameter("h_jiage")这个值为空为什么能执行到里面去呢
null 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询