mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
大屏静态时间 优化成动态时间
This commit is contained in:
parent
9e97735323
commit
e34611e2ba
@ -10,6 +10,26 @@
|
||||
<script src="/js/vue/vue.min.js"></script>
|
||||
<script src="/js/vue/vue-resource.min.js"></script>
|
||||
|
||||
<script>
|
||||
var t = null;
|
||||
t = setTimeout(time,1000);//開始运行
|
||||
function time()
|
||||
{
|
||||
clearTimeout(t);//清除定时器
|
||||
dt = new Date();
|
||||
var y=dt.getFullYear();
|
||||
var mt=dt.getMonth()+1;
|
||||
var day=dt.getDate();
|
||||
var h=dt.getHours();//获取时
|
||||
var m=dt.getMinutes();//获取分
|
||||
var s=dt.getSeconds();//获取秒
|
||||
document.getElementById("showTime").innerHTML = y+"年"+mt+"月"+day+"-"+h+"时"+m+"分"+s+"秒";
|
||||
document.getElementById("showTime2").innerHTML = y+"年"+mt+"月"+day+"-"+h+"时"+m+"分"+s+"秒";
|
||||
t = setTimeout(time,1000); //设定定时器,循环运行
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="bnt">
|
||||
@ -75,7 +95,9 @@
|
||||
<h2 class="tith2 pt3">小区资产</h2>
|
||||
<div class="lefttoday_tit">
|
||||
<p class="fl">状态:在用</p>
|
||||
<p class="fr">时间段:2018-06-10</p>
|
||||
<p class="fr">
|
||||
<span id="showTime"></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="puleft2height">
|
||||
<div class="widget-inline-box text-center ">
|
||||
@ -104,7 +126,9 @@
|
||||
<h2 class="tith2 pt3">今日巡检</h2>
|
||||
<div class="lefttoday_tit ">
|
||||
<p class="fl">状态:正在巡检</p>
|
||||
<p class="fr">时间段:2018-06-10</p>
|
||||
<p class="fr">
|
||||
<span id="showTime2"></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="left2_table pumiddboxttop2_cont">
|
||||
<ul id="todayInpection">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user