要JSP页面上实现判断输入时间大于系统时间

来源:百度知道 编辑:UC知道 时间:2024/05/29 22:57:15
我要做个会议预约模块,预约会议时要求输入的预约时间要大于现在的系统时间,怎么解决?我原本想写个javascript解决,可没写出来,急待解决!!

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
<script language='javascript'>
function ddd(oText){
iDay = new Date();
iYear = iDay.getFullYear();
iMonth = iDay.getMonth()+1;
iDate = iDay.getDate();
iHour = iDay.getHours();
oForm = document.getElementById("allArea");
if(oForm[0].value ==""||oForm[1].value ==""||oForm[2].value ==""||oForm[3].value ==""){
alert("不能留空");
return false;
}
if(oForm[0].value !=="" && oForm[0].value<iYear){
alert("年份小了");
return false;
}
else if(oForm[0].value==iYear){
if(oForm[1].value < iMonth){
alert("月份添小了&quo