方法一:
var d = new Date();
d = new Date(d.getFullYear(),d.getMonth(),d.getDate()-n);
方法二:
var now = new Date();
now.setTime(now.getTime()-n*24*60*60*1000);
方法一:
var d = new Date();
d = new Date(d.getFullYear(),d.getMonth(),d.getDate()-n);
方法二:
var now = new Date();
now.setTime(now.getTime()-n*24*60*60*1000);