惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
N
Netflix TechBlog - Medium
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes
Simon Willison's Weblog
Simon Willison's Weblog
I
Intezer
L
Lohrmann on Cybersecurity
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
The Register - Security
The Register - Security
T
Threat Research - Cisco Blogs
P
Privacy & Cybersecurity Law Blog
A
Arctic Wolf
F
Fortinet All Blogs
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
V
Visual Studio Blog
Know Your Adversary
Know Your Adversary
博客园 - Franky
C
Check Point Blog
P
Privacy International News Feed
NISL@THU
NISL@THU
T
Tenable Blog
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
B
Blog RSS Feed
A
About on SuperTechFans
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
G
Google Developers Blog
WordPress大学
WordPress大学
T
Threatpost
Y
Y Combinator Blog
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
T
Tor Project blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Spread Privacy
Spread Privacy

博客园 - 柏放

检测移动设备横竖屏 [转]一句css代码让你的网站变灰,一起悼念地震中逝去的生命! MYSQL命令行常用操作 MySQL数据库导入导出详解[转发] 国外达人收集的Cheet Sheet PHP学习:字符串操作和正则表达式 PHP学习:数组 PHP学习:文件操作 SQL Server:获得用户最新或前n条订单的几种SQL语句 SQL Server:APPLY表运算符 SQL Server:查询当前服务器有多少连接请求 SQL Server:关于Null的一些事 SQL Server:在Management Studio中使用Web浏览器 SQL Server:获得表的元数据 - SET FMTONLY ON 排序:插入排序及希尔排序 SQL Server:把CSV文件导入到SQL Server表中 SQL Server:使用一个语句块插入多条记录 SQL Server:在事务中回滚TRUNCATE操作 Google Map API学习记录
js倒计时
柏放 · 2011-07-21 · via 博客园 - 柏放

<span id="countdown_hour"></span>:
<span id="countdown_minute"></span>:
<span id="countdown_second"></span>
<script type="text/javascript">
    
var nowTime = new Date().getTime();
    
var endTime = new Date("Jun 18, 2011 10:00:00").getTime();
    
var countDownTimer = null;
    
function get2Num(a) { if (a < 10) { return "0" + a } return "" + a; }
    
function countDown() {
        
var _diff = parseInt((endTime - nowTime) / 1000);
        
var _day = parseInt(_diff / 3600 / 24);
        
var _hour = Math.floor((_diff / 3600% 24);
        
var _minute = Math.floor((_diff / 60% 60);
        
var _second = Math.floor(_diff % 60);
        _hour 
= _day > 0 ? (_day * 24+ _hour : _hour;
        
if (_diff <= 0) {
            window.clearInterval(countDownTimer);
            updateLED(
00,0);
            
return;
        }
        updateLED(_hour,_minute,_second);
        nowTime 
+= 1000;
    }
    
function updateLED(h, m, s) {
        document.getElementById(
"countdown_hour").innerHTML = get2Num(h);
        document.getElementById(
"countdown_minute").innerHTML = get2Num(m);
        document.getElementById(
"countdown_second").innerHTML = get2Num(s);
    }
    countDownTimer 
= window.setInterval(countDown, 1000);
</script>