标签:
计算两个日期的差
var first = new Date(objstart.value.replace(/-/g,"/"));
var second = new Date(objend.value.replace(/-/g,"/"));
alert("日期1比日期2大:"+(first-second)/(24*60*60*1000));
比较两个日期的大小
var date1 = new Date(Date.parse(objstart.value.replace(/-/g, "/")));
var date2 = new Date(Date.parse(objend.value.replace(/-/g, "/")));
date1>date2
标签:
原文地址:http://www.cnblogs.com/heheyixiao/p/4215814.html