var date1=Date.parse("2014-9-3 11:40:14".replace(/-/g,"/")); var date2=Date.parse("2014-9-3 12:03:44".replace(/-/g,"/")); var now=new Date(); if(date1>now) { alert("未开始"); }else if(date2<=now) { alert("已结束");}
时间: 2024-10-12 00:17:32
var date1=Date.parse("2014-9-3 11:40:14".replace(/-/g,"/")); var date2=Date.parse("2014-9-3 12:03:44".replace(/-/g,"/")); var now=new Date(); if(date1>now) { alert("未开始"); }else if(date2<=now) { alert("已结束");}