初始化提交

This commit is contained in:
shenquanyi
2024-07-04 15:22:53 +08:00
commit e8e1d42051
325 changed files with 33524 additions and 0 deletions

17
js/timers.js Normal file
View File

@@ -0,0 +1,17 @@
//将秒转化为时间戳
function timestampToTime(seconds){
var date = new Date(seconds*1000)
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
var currentTime = year + "-" + month + "-" + day ;
return currentTime
}
//过滤字符串中所有html标签
function filterHTMLTag(str) {
str = str.replace(/<\/?[^>]*>/g, ''); //去除HTML tag
str = str.replace(/[ | ]*\n/g, '\n'); //去除行尾空白
str = str.replace(/ /ig, ''); //去掉
return str;
}