js
神呐
这个作者很懒,什么都没留下…
展开
-
js 日期比较
if(nowDate() > date){ // 昨天 $("#yesterday").html(htmlStr); }else if (nowDate() < date){ // 明天 $("#tomorrow").html(htmlStr); }else { // 今天 $("#today").html(htmlStr); } // 今日日期 function nowDate(){ let now = new Date(); .原创 2021-05-10 08:35:20 · 489 阅读 · 0 评论 -
文件链接在google浏览器无法打开或下载
链接不是HTTPS的,认为不安全,替换成https就可以了 // 打开或下载文件 function openFile(extension,file_url){ let replace = file_url.replace('http:','https:'); window.open(replace) }原创 2021-05-10 08:34:16 · 1762 阅读 · 0 评论