//var yourtime=document.getElementById('begin_time').value;var yourtime='2009-12-10'; yourtime = yourtime.replace(/-/g,"/");//替换字符,变成标准格式var d2=new Date();//取今天的日期var d1 = new Date(Date.parse(yourtime));//alert(d1);//alert(d2);if(d1>d2){ alert("开始大于结束");}