87,907
社区成员
发帖
与我相关
我的任务
分享
var now = new Date()
var month = now.getMonth()+1
month = month >= 10?month:"0"+month
var date = now.getDate()
date = date >= 10?date :"0"+date
var url = `/某一目录/${month}${date}.html`
fetch(url).then(res => {
if(res.status === 404){
location.href = "noday.html"
}
else{
location.href = url
}
})