计算两个日期的差
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
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