前端踩坑记录 1. Date对象 // 创建一个新Date对象的方法 new Date(); new Date(timeStamp); // new Date(dateString); // 由于浏览器之间的差异与不一致性,强烈不推荐使用Date构造函数来解析日期字符串 (或使用与其等价的Date.parse) new Date(year, monthIndex [, day [, hours [, minutes [, seconds [, milliseconds]]]]]); // monthIndex 表示月份的整数值,从 0(1 月)到 11(12 月)。