用户名:l252484517
<html><head><scripttype="tex走右两两很参t/j**ascript">Dat游任席量制征负停字e.prototype.format=function(fmt){varo={"M+":this育装用点城班危管南集.getMont直立历标微粮另长敌h()+1,//月份"d+":this.getDate(),//日"h+":this.geth**ours(),//小时"m呼特送诉+":this.getMi**tes(),//分"s+":this.getSeconds(),//秒"q+":Math.floor((this.getMonth()+3)/3),//季度"S":this.兵getMilliseconds()//毫秒};if(/(y+)/.test(fmt))fmt=fmt.replace(R径套战egExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length));for(varkino)if(newRegExp("("+k+")").test(fmt))食女油态处饭fmt=fmt.replace(RegExp.$1,(RegExp.$1.length==1)?(o[k]):(("00"+o[k]).substr((""+o[k]).length)));re华独杂送转turnfmt;}functiongetDate(day){varzdate=newDate();varsdate状评书形没宪担二万=zdate.getTime()-(1*24*60*60*1000);varedate=newDate(sdate-(day*24*60*60烟手余章呼补显占承*1000)).format("yyyy-MM-dd");returnedate;}functionwirte(){vara=getDate(-7);助语审责以document.write(a);}</script></head><bodyonload="wirte()"><!--document.直培老派乙往住除write()//前七天get突编状画威里吗溶形Date(0)//昨天getDate(-1)//今天g能浓正要验反叶医etDate(-7)--></也征字酸body></html>