<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans">
	<id>https://wiki.fangc.top/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3A%E6%AD%BB%E4%BA%A1%E5%80%92%E8%AE%A1%E6%97%B6</id>
	<title>模板:死亡倒计时 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fangc.top/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3A%E6%AD%BB%E4%BA%A1%E5%80%92%E8%AE%A1%E6%97%B6"/>
	<link rel="alternate" type="text/html" href="https://wiki.fangc.top/index.php?title=%E6%A8%A1%E6%9D%BF:%E6%AD%BB%E4%BA%A1%E5%80%92%E8%AE%A1%E6%97%B6&amp;action=history"/>
	<updated>2026-04-19T18:09:06Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.fangc.top/index.php?title=%E6%A8%A1%E6%9D%BF:%E6%AD%BB%E4%BA%A1%E5%80%92%E8%AE%A1%E6%97%B6&amp;diff=2038&amp;oldid=prev</id>
		<title>2024年9月19日 (四) 19:11 FC</title>
		<link rel="alternate" type="text/html" href="https://wiki.fangc.top/index.php?title=%E6%A8%A1%E6%9D%BF:%E6%AD%BB%E4%BA%A1%E5%80%92%E8%AE%A1%E6%97%B6&amp;diff=2038&amp;oldid=prev"/>
		<updated>2024-09-19T19:11:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;85年倒计时&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;style&amp;gt;&lt;br /&gt;
        #countdown {&lt;br /&gt;
            font-size: 24px;&lt;br /&gt;
            text-align: center;&lt;br /&gt;
        }&lt;br /&gt;
    &amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;countdown&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;script&amp;gt;&lt;br /&gt;
        // 获取倒计时元素&lt;br /&gt;
        const countdownElement = document.getElementById(&amp;#039;countdown&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
        // 设置出生日期（可替换）&lt;br /&gt;
        const birthDate = new Date(&amp;#039;1998-06-09&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
        // 计算预期死亡日期（85岁）&lt;br /&gt;
        const deathDate = new Date(birthDate);&lt;br /&gt;
        deathDate.setFullYear(birthDate.getFullYear() + 85);&lt;br /&gt;
&lt;br /&gt;
        // 更新倒计时函数&lt;br /&gt;
        function updateCountdown() {&lt;br /&gt;
            // 获取当前时间&lt;br /&gt;
            const now = new Date().getTime();&lt;br /&gt;
&lt;br /&gt;
            // 计算剩余时间（毫秒）&lt;br /&gt;
            let distance = deathDate.getTime() - now;&lt;br /&gt;
&lt;br /&gt;
            // 如果距离为负数，说明已经超过预期寿命，显示已过期&lt;br /&gt;
            if (distance &amp;lt; 0) {&lt;br /&gt;
                clearInterval(x);&lt;br /&gt;
                countdownElement.innerHTML = &amp;quot;已超过预期寿命&amp;quot;;&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            // 将毫秒转换为秒&lt;br /&gt;
            distance = Math.floor(distance / 1000);&lt;br /&gt;
&lt;br /&gt;
            // 更新显示&lt;br /&gt;
            countdownElement.innerHTML = `${distance} `;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // 每秒更新一次&lt;br /&gt;
        const x = setInterval(updateCountdown, 1000);&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;</summary>
		<author><name>FC</name></author>
	</entry>
</feed>