开源大世界

kydsj.vip 【首页】

用户工具

站点工具


playground:playground

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
playground:playground [2023/12/25 05:57] – [标题2] mathplayground:playground [2024/01/28 11:00] (当前版本) – [标题 H1] 大王你怎么了
行 24: 行 24:
 $\frac{a}{b}\pm \frac{c}{d}= \frac{ad \pm bc}{bd} $ $\frac{a}{b}\pm \frac{c}{d}= \frac{ad \pm bc}{bd} $
  
 +
 +$$\frac{a}{b}\pm \frac{c}{d}= \frac{ad \pm bc}{bd} $$
  
 ---- ----
行 51: 行 53:
 ---- ----
  
 +<html>
 +<head>
 +  <meta charset="UTF-8">
 +  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 +  <style>
 +    body {
 +      font-family: 'Arial', sans-serif;
 +      margin: 50px;
 +    }
 +
 +    #countdown {
 +      font-size: 24px;
 +      margin-top: 20px;
 +    }
 +  </style>
 +</head>
 +<body>
 +
 +  <h1>倒计时</h1>
 +
 +  <label for="birthdate">输入你的消失日期:</label>
 +  <input type="date" id="birthdate">
 +  <button onclick="startCountdown()">开始倒计时</button>
 +
 +  <div id="countdown"></div>
 +
 +  <script>
 +    let countdownInterval;
 +
 +    function startCountdown() {
 +      // 清除之前的倒计时定时器
 +      clearInterval(countdownInterval);
 +
 +      // 获取用户输入的日期
 +      const birthdateInput = document.getElementById('birthdate');
 +      const birthdate = new Date(birthdateInput.value);
 +
 +      // 更新倒计时显示
 +      updateCountdown(birthdate);
 +
 +      // 每秒更新一次倒计时
 +      countdownInterval = setInterval(() => {
 +        updateCountdown(birthdate);
 +      }, 1000);
 +    }
 +
 +    function updateCountdown(birthdate) {
 +      // 获取当前日期和时间
 +      const now = new Date();
 +
 +      // 计算距离日期的秒数
 +      const timeDifference = Math.floor((birthdate - now) / 1000);
 +
 +      // 更新页面上的倒计时显示
 +      const countdownElement = document.getElementById('countdown');
 +      countdownElement.textContent = `人生还剩余 ${timeDifference} 秒`;
 +    }
 +  </script>
  
 +</body>
 +</html>
 ====== 灌水 ====== ====== 灌水 ======
  
playground/playground.1703455038.txt.gz · 最后更改: 2023/12/25 05:57 由 math

⭐24小时内访问人数:【307】⭐