以下是6个月前日期: var dt = new Date(); dt.setMonth( dt.getMonth()-6 ); console.log( dt.toLocaleString() ); 是不是秒懂