js时间比较
前提:时间为yyyy-MM-dd
var licenseStartYear = $("#时间1").val();
var licenseEndYear = $("#时间2").val();
var arrStart = licenseStartYear.split("-");
var arrEnd = licenseEndYear.split("-");
var startTime = new Date(arrStart[0],arrStart[1],arrStart[2]);
var endTime = new Date(arrEnd[0],arrEnd[1],arrEnd[2]);
var sTime = startTime.getTime();
var eTime = endTime.getTime();
if(sTime >= eTime){
alert("时间start应小于时间end !");
return false;
}