我知道用jsp如何判断---用正则表达式:import java.util.regex;....Pattern p=Pattern.complie("[0-9]{4}-[0-9]{2}-[0-9]{2}\\s[0-9]{2}[0-9]{2}");
Matcher m=p.matcher("你读取的日期");
boolean result=m.find();if(result){out.println("格式正确")} else{out.println("格式不对");}....
给你一个参考贴:
http://community.csdn.net/Expert/topic/2976/2976120.xml?temp=.2563898
Matcher m=p.matcher("你读取的日期");
boolean result=m.find();if(result){out.println("格式正确")} else{out.println("格式不对");}....
给你一个参考贴:
http://community.csdn.net/Expert/topic/2976/2976120.xml?temp=.2563898
月在1到12之间,天在1到31之间。比如<% Y=request.getparameter(year) %>
把Y值从客户端读出来,然后进行判定Y,懂了?