标签:日期 alert sar res rda jquery var date pre
var sDate=‘2016-10-31‘;
var eDate=‘2016-10-10‘
var sArr = sDate.split("-");
var eArr = eDate.split("-");
var sRDate = new Date(sArr[0], sArr[1], sArr[2]);
var eRDate = new Date(eArr[0], eArr[1], eArr[2]);
var result = (sRDate-eRDate)/(24*60*60*1000);
alert(
result
);
标签:日期 alert sar res rda jquery var date pre
原文地址:http://www.cnblogs.com/isungge/p/6016906.html