CodePudding user response:
Var now=new Date ()
Var month=now. GetMonth () + 1
The month=month & gt;=10? The month: "0" + month
Var date=now. GetDate ()
The date=date & gt;=10? Date: "0" + date
Var url=`/a directory/${month} ${date}. The HTML `
The fetch (url). Then (res=& gt; {
If (res) status===404) {
Location. A href="https://bbs.csdn.net/topics/noday.html"
}
The else {
Location. A href=https://bbs.csdn.net/topics/url
}
})
CodePudding user response:
First of all, I appreciate your help, I understand, and I think whether can pop-up window can be closed in the div today, because I want to achieve in the history of the content is the PDF, my original idea is the pop-up window, the PDF content into HTML, in the pop-up page, but that feeling is bad, can have a better way to experience?CodePudding user response:
In a popup window plug-in, url to PDF filesReference: http://layer.layui.com/