第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何創(chuàng)建帶有 9 個計時器的網(wǎng)頁?

如何創(chuàng)建帶有 9 個計時器的網(wǎng)頁?

PHP
楊__羊羊 2021-08-28 11:00:43
我找到了以下用于簡單倒數(shù)計時器的 javascript 代碼,但我需要根據(jù)文件 /run/Aquarium/Active.run 中的值在頁面上顯示 9 個計時器。該文件包含 10 個整數(shù),范圍從 0 到 7200,以空格分隔。最后 9 個值中的每一個都代表每個計時器應(yīng)該倒計時到零的秒數(shù)。我對 javascript 的了解不夠,無法將其擴(kuò)展為 9 計時器功能。這是我已經(jīng)擁有的:div.Main {    position: fixed;    top: 26;    left: 180;    width: 300px;    font: bold 24px Arial;    color: black;}div.Relay1 {    position: fixed;    top: 120;    left: 60;    width: 300px;    font: bold 24px Arial;    color: black;}div.Relay2 {    position: fixed;    top: 150;    left: 60;    width: 300px;    font: bold 24px Arial;    color: black;}...div.Relay8 {    position: fixed;    top: 330;    left: 60;    width: 300px;    font: bold 24px Arial;    color: black;}</style><script type="text/javascript">function startTimer(duration, display) {    var timer = duration, minutes, seconds;    setInterval(function () {        minutes = parseInt(timer / 60, 10);        seconds = parseInt(timer % 60, 10);        minutes = minutes < 10 ? "0" + minutes : minutes;        seconds = seconds < 10 ? "0" + seconds : seconds;        display.textContent = minutes + ":" + seconds;        if (--timer < 0) {            timer = duration;        }    }, 1000);}window.onload = function () {        display = document.querySelector('#time');    startTimer(TMinutes, display);};</script></HEAD><BODY style="background-color:#00EE66"><h1>Aquarium Equipment Status</h1><?php$file = fopen("/run/Aquarium/Active.run","r");$Times = fgetcsv($file,64,' ');fclose($file);?><div class="Main"><script type="text/javascript">var TMinutes = 0TMinutes = <?php echo $Times[1] ?>;</script><span id="time">000:00</span></div><div class="Relay1"><script type="text/javascript">????
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 188 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號