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

推荐订阅源

C
Check Point Blog
罗磊的独立博客
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
J
Java Code Geeks
WordPress大学
WordPress大学
大猫的无限游戏
大猫的无限游戏
Blog — PlanetScale
Blog — PlanetScale
F
Fortinet All Blogs
小众软件
小众软件
M
MIT News - Artificial intelligence
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
Y
Y Combinator Blog
Recorded Future
Recorded Future
量子位
美团技术团队
S
Security @ Cisco Blogs
G
Google Developers Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
D
Docker
S
Schneier on Security
T
Tor Project blog
阮一峰的网络日志
阮一峰的网络日志
T
Threatpost
P
Privacy & Cybersecurity Law Blog
C
Cisco Blogs
L
Lohrmann on Cybersecurity
NISL@THU
NISL@THU
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
I
Intezer
Latest news
Latest news
Martin Fowler
Martin Fowler
G
GRAHAM CLULEY
B
Blog
V
Vulnerabilities – Threatpost
The Register - Security
The Register - Security
S
Securelist
T
Tenable Blog

博客园 - xixi8820

输入框验证输入数字的js 关于VS2005中GridView的自定义分页,单选、多选、排序、自增列的简单应用(转载的) 使用t-sql从身份证号中提取生日(转自别人,个人学习收藏用) 一个最简单的登录例子 js将html中的内容导出word、或者excel文件的方法 javascript 获得指定日期的临近日期的方法 asp.net 2.0 生成验证码 在Asp.Net中应用DataFormatString ASP.NET中App_Code,App_Data等文件夹的作用 javascript 客户端验证 在DataGrid中模版列显示图片 上传图片 页面取物理路径和几种获取asp.net应用程序的路径 模式窗口关闭,并刷新父窗口的方法 跨页面实现多选 用window.location.href实现刷新另个框架页面 听说是个高效的分页存储过程,可以轻松应对百万数据(转) keycode 值 DataGrid点击删除按钮弹出对话框的问题
js中setTimeout与setInterval的区别
xixi8820 · 2008-02-22 · via 博客园 - xixi8820

很多人都觉得这两个方法差不多,但是,实际上,他们差的很远呢
因为setTimeout(表达式,延时时间)在执行时,是在载入后延迟指定时间后,去执行一次表达式,记住,次数是一次
而setInterval(表达式,交互时间)则不一样,它从载入后,每隔指定的时间就执行一次表达式
所以,完全是不一样的 。使用setInterval与clearInterval的一段代码:

 1 var begin = setInterval("RefreshPromptList()",20000);
 2 
 3 function StopPopup()
 4 {
 5     clearInterval(begin);
 6     popupWindow.close();
 7 }
 8 
 9 
10 function RefreshPromptList()
11 {
12     popupWindow.show();
13     GetPromptList();
14 }

很多人习惯于将setTimeout包含于被执行函数中,然后在函数外再次使用setTimeout来达到定时执行的目的
这样,函数外的setTimeout在执行函数时再次触发setTimeout从而形成周而复始的定时效果