時(shí)間:2023-05-07 22:15:01 | 來(lái)源:網(wǎng)站運(yùn)營(yíng)
時(shí)間:2023-05-07 22:15:01 來(lái)源:網(wǎng)站運(yùn)營(yíng)
最簡(jiǎn)單的一個(gè)網(wǎng)頁(yè)倒計(jì)時(shí)代碼 時(shí)間到期后會(huì)顯示出提醒內(nèi)容 收藏版: 很多時(shí)候我們都是需要提醒自己做什么事情的,像我這么健忘的,更加需要倒計(jì)時(shí)之類(lèi)的記錄來(lái)提醒自己,這是我找到最簡(jiǎn)單簡(jiǎn)介的代碼了!<!doctype html><html><head><meta charset="utf-8"><title>最簡(jiǎn)單的一個(gè)網(wǎng)頁(yè)倒計(jì)時(shí)代碼 時(shí)間到期后會(huì)顯示出提醒內(nèi)容 收藏版</title><style>*{ margin:0; padding:0; list-style:none;}body{ font-size:18px; text-align:center;}.time{ height:30px; padding:200px;}</style></head><body> <div class="time"> <span id="t_d">00天</span> <span id="t_h">00時(shí)</span> <span id="t_m">00分</span> <span id="t_s">00秒</span> <span id="daoqi"></span> </div><script> function GetRTime(){ var EndTime= new Date('2017/06/20 00:00:00');//這里設(shè)置你預(yù)定的時(shí)間 var NowTime = new Date(); var t =EndTime.getTime() - NowTime.getTime(); var d=Math.floor(t/1000/60/60/24); var h=Math.floor(t/1000/60/60%24); var m=Math.floor(t/1000/60%60); var s=Math.floor(t/1000%60); document.getElementById("t_d").innerHTML = d + "天"; document.getElementById("t_h").innerHTML = h + "時(shí)"; document.getElementById("t_m").innerHTML = m + "分"; document.getElementById("t_s").innerHTML = s + "秒"; if(s=="0" && m=="0" && h=="0" && d=="0"){ document.getElementById("daoqi").innerHTML ="時(shí)間到了,是時(shí)候做xxx了";//這里設(shè)置到期時(shí)間后的提醒內(nèi)容 document.getElementById("daoqi").style.color="red";}} setInterval(GetRTime,0); </script></body></html>
關(guān)鍵詞:收藏,內(nèi)容,提醒,簡(jiǎn)單,時(shí)代
客戶(hù)&案例
營(yíng)銷(xiāo)資訊
關(guān)于我們
客戶(hù)&案例
營(yíng)銷(xiāo)資訊
關(guān)于我們
微信公眾號(hào)
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。