摘要: var s1 = "2007-01-01";var s2 = "2007-12-31";s1 = s1.replace(/-/g, "/");s2 = s2.replace(/-/g, "/");s1 = new Date(s1);s2 = new Date(s2);var times= s1.getTime() - s2.getTime();vardays = parseInt(times/ (1000 * 60 * 60 * 24));alert("相差天数: " + days); 阅读全文
posted @ 2013-04-25 17:03 小郑 阅读(371) 评论(0) 推荐(0) 编辑