var yourtime=‘2010-12-10 11:12‘;
yourtime = yourtime.replace("-","/");//替换字符,变成标准格式
var d2=new Date();//取今天的日期
var d1 = new Date(Date.parse(yourtime));
alert(d1);
alert(d2);
if(d1>d2){
alert("开始大于结束");
}
时间: 2024-10-08 04:03:06