JS设置时间为6天后

Date对象

var oDate = new Date;
console.log("当前时间:" + oDate)
oDate.setDate( oDate.getDate() + 6 );//设置为6天
// oDate.setDate();//设置天时间
// oDate.getDate();//获取天时间
console.log("修改后时间:" + oDate)

 

posted @ 2020-02-20 23:05  JackAfan  阅读(171)  评论(0)    收藏  举报
setTimeout(function(){ let aImg = document.querySelectorAll("img"); aImg.forEach(img=>{ img.alt = "" }) console.log("去除img-alt成功") },1000)