1 Star 0 Fork 0

partyli/day-note-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.html.bak 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
partyli 提交于 2020-11-07 02:20 . 嗯哼
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>你好</title>
<script>
function clock(){
var date = new Date();
var year = date.getFullYear();
var month = pushone(date.getMonth() +1);
var day = pushone(date.getDate());
var week =date.getDay();
var weekArray = new Array("","","","","","","");
var hours = pushone(date.getHours());
var minutes = pushone(date.getMinutes());
var seconds = pushone(date.getSeconds());
var time = year +"" + month + "" + day + " " + "星期" + weekArray[week] + " " + hours + ":" + minutes + ":" + seconds;
document.getElementById('clock').innerHTML = time;
setTimeout( "clock()", 1000);
}
function pushone(num){
if(num < 10){
num = "0" + num;
return num;
}else{
return num;
}
}
</script>
</head>
<body onLoad="clock()">
我的图床
<p id="clock">
</p>
<p align="center">
<img src="ImgCode@2x.png" alt="收款码">
</p>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/partyli/day-note-demo.git
git@gitee.com:partyli/day-note-demo.git
partyli
day-note-demo
day-note-demo
master

搜索帮助