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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
T
Threatpost
T
The Exploit Database - CXSecurity.com
T
Threat Research - Cisco Blogs
S
Securelist
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
S
Secure Thoughts
MyScale Blog
MyScale Blog
O
OpenAI News
P
Palo Alto Networks Blog
美团技术团队
C
Cyber Attacks, Cyber Crime and Cyber Security
TaoSecurity Blog
TaoSecurity Blog
量子位
L
Lohrmann on Cybersecurity
G
GRAHAM CLULEY
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
Know Your Adversary
Know Your Adversary
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Simon Willison's Weblog
Simon Willison's Weblog
宝玉的分享
宝玉的分享
PCI Perspectives
PCI Perspectives
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
I
InfoQ
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
S
Security @ Cisco Blogs
S
Schneier on Security
B
Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Cloudflare Blog
AWS News Blog
AWS News Blog
IT之家
IT之家
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
H
Heimdal Security Blog
I
Intezer
A
Arctic Wolf
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Help Net Security
W
WeLiveSecurity

博客园 - Ekin.S.Sun

document.execCommand Web文件ContentType类型大全 ArcGIS符号库制作过程说明 AJAX and the ASP.NET 2.0 Callback Framework My heart hurt:( Working with the ArcGIS Server ArcObjects API : ArcObjects API Js网页打印处理 c#和js的交互(转) MapInfo格式到ArcGIS格式的转换方法 ArcGIS Server 9.2建立的web Application实现打印的一篇文章。 .net学习站点推荐 AJAX .Net组件用户指南(译文&原文) New characteristic of Visual Studio 2005 ASP.NET中常用发送邮件功能代码总结 C#常用正则表达式 ASP.NET系统用户权限设计与实现 how to use Form Authentication in ASP.NET. web.config文件详解 [转] 软件测试的一些认识
JavaScript中的一些重要却容易被忽视的东西
Ekin.S.Sun · 2007-09-23 · via 博客园 - Ekin.S.Sun

一.JavaScript中defer的作用

       使用defer属性可以让脚本在整个页面装载完成之后再解析,而非边装载边解析。   
这对于只包涵事件触发的js脚本而言,可以提高整个页面的加载速度。

      DEFER是脚本程序强大功能中的一个“无名英雄”。你可能从没有使用过它,但是看完这里的介绍后,相信你就离不开它。它告诉浏览器Script段包含了无需立即执行的代码,并且,与SRC属性联合使用,它还可以使这些脚本在后台被下载,前台的内容则正常显示给用户。  
   
   
  最后请注意两点:  
   
  1、不要在defer型的脚本程序段中调用document.write命令,因为document.write将产生直接输出效果。  
   
  2、而且,不要在defer型脚本程序段中包括任何立即执行脚本要使用的全局变量或者函数。