JavaScriptは時間の大きさを比較します.

431 ワード

//var time=document.getElementById('begin_time').value;   
var time = '2010-12-10 11:12';   
time = time.replace("-","/");//    ,       
var beginTime = new Date(Date.parse(time)); 
var endTime = new Date();//         
alert(beginTime);   
alert(endTime);   
if(beginTime>endTime){   
  alert("           !");   
}