获取当天从0点到23:59的时间,兼容ie;获取当天时间
获取当天从0点到23:59的时间
// ie不兼容 var startTime = new Date(new Date(new Date().toLocaleDateString()).getTime()); var endTime = new Date(new Date(new Date().toLocaleDateString()).getTime() +24 * 60 * 60 * 1000 -1
// 兼容Ie new Date(new Date().toLocaleDateString().replace(/(年|月)/g,"/").replace("日","").replace(/[^\d-/]/g,'')).getTime(), new Date(new Date(new Date().toLocaleDateString().replace(/(年|月)/g,"/").replace("日","").replace(/[^\d-/]/g,'')).getTime() +24 * 60 * 60 * 1000 -1)