代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
<title>返校通行证</title>
<link type="text/css" rel="stylesheet" href="./weui_f.css" />
<script src="./jQuery.js"></script>
<script src="<%=path%>/static/test/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
var timer = null;
var num = 0;
var aColor = ["rgba(221, 166, 103, 0.842)", "rgba(189, 177, 17, 0.932)", "rgba(17, 135, 189, 0.932)", "rgba(9, 177, 189, 0.295)", "rgba(164, 8, 184, 0.301)", "rgba(253, 1, 1, 0.466)"];
var colLength = aColor.length
clearInterval(timer);
timer = setInterval(function() {
$("#element").css("background-color", aColor[num]);
num++;
num %= colLength;
console.log(num);
}, 600)
</script>
<script type="text/javascript">
window.onload = function() {
setInterval(function() {
var date = new Date();
var sign1 = "/";
var sign2 = ":";
var year = date.getFullYear() // 年
var month = date.getMonth() + 1; // 月
var day = date.getDate(); // 日
var hour = date.getHours(); // 时
var minutes = date.getMinutes(); // 分
var seconds = date.getSeconds() //秒
var weekArr = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
var week = weekArr[date.getDay()];
// 给一位数数据前面加 “0”
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (day >= 0 && day <= 9) {
day = "0" + day;
}
if (hour >= 0 && hour <= 9) {
hour = "0" + hour;
}
if (minutes >= 0 && minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds >= 0 && seconds <= 9) {
seconds = "0" + seconds;
}
//获取id=Date的标签,加入内容。
var d = document.getElementById('date');
d.innerHTML = "时间:" + year + sign1 + month + sign1 + day + " " + hour + ":" + minutes + ":" + "23";
}, 1000)
};
/* d.innerHTML='当前时间:'+ year + sign1 + month + sign1 + day + " " + hour + sign2 + minutes + sign2 + seconds;},1000)};不带星期的*/
</script>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
#element {
background: rgba(9, 177, 189, 0.295);
width: 100%;
height: 220px;
font-size: 20px;
text-align: center;
line-height: 200px;
}
</style>
</head>
<body ontouchstart style="background-color: white;">
<span aria-hidden="true" id="js_a11y_comma" class="weui-hidden_abs"></span>
<div id="element">
<img src="./goback.png" style="padding-top: 32px;">
</div>
<div class="weui-cells__title">学生返校通行证</div>
<div class="weui-cells">
<div role="option" class="weui-cell weui-cell_example">
<div class="weui-cell__hd"><img src="./person.png" alt="" style="width: 20px; margin-right: 16px; display: block;"></div>
<div class="weui-cell__bd">
<p>学号:191491306</p>
</div>
</div>
<div role="option" class="weui-cell weui-cell_example">
<div class="weui-cell__hd"><img src="./person.png" alt="" style="width: 20px; margin-right: 16px; display: block;"></div>
<div class="weui-cell__bd">
<p>姓名:姚君昊</p>
</div>
</div>
<div role="option" class="weui-cell weui-cell_example">
<div class="weui-cell__hd"><img src="./person.png" alt="" style="width: 20px; margin-right: 16px; display: block;"></div>
<div class="weui-cell__bd">
<p>学院:信息学院</p>
</div>
</div>
<div role="option" class="weui-cell weui-cell_example">
<div class="weui-cell__hd"><img src="./time.png" alt="" style="width: 20px; margin-right: 16px; display: block;"></div>
<div class="weui-cell__bd">
<li id="date" style="list-style: none;"></li>
</div>
</div>
</div>
<div class="page__bd page__bd_spacing">
<div class="weui-footer">
<br>
<br>
<br>
<p class="weui-footer__text">版权所有 © 辽宁大学</p>
</div>
</div>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。