js获取上个月的第一天和最后一天
var now = new Date();
var fd = new Date(now.getFullYear(), now.getMonth()-1 ,1).toLocaleDateString();
var ed = new Date(now.getFullYear(), now.getMonth(), 0).toLocaleDateString();
console.log(fd);
console.log(ed);
var now = new Date();
var fd = new Date(now.getFullYear(), now.getMonth()-1 ,1).toLocaleDateString();
var ed = new Date(now.getFullYear(), now.getMonth(), 0).toLocaleDateString();
console.log(fd);
console.log(ed);