Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
jQuery 快速入门
Search
uictechparty
July 08, 2012
Programming
1
150
jQuery 快速入门
By xingzhi, 2n TechParty@UIC
uictechparty
July 08, 2012
Tweet
Share
More Decks by uictechparty
See All by uictechparty
产品经理是做什么的呢?
uictechparty
1
220
找人
uictechparty
3
470
香港研究生申请经验分享
uictechparty
0
410
css.pdf
uictechparty
1
220
Introduction to Design Patterns
uictechparty
2
150
编写高质量Java代码的7个建议
uictechparty
2
190
视觉障碍出行辅助仪 -The Third Eye
uictechparty
1
120
Introduction to NodeJS
uictechparty
1
220
Introduction to Hadoop
uictechparty
3
230
Other Decks in Programming
See All in Programming
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
AtCoder Conference 2025
shindannin
0
1.1k
組織で育むオブザーバビリティ
ryota_hnk
0
180
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
140
Patterns of Patterns
denyspoltorak
0
1.4k
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
470
Grafana:建立系統全知視角的捷徑
blueswen
0
330
CSC307 Lecture 03
javiergs
PRO
1
490
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
CSC307 Lecture 09
javiergs
PRO
1
840
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Amusing Abliteration
ianozsvald
0
100
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
Building an army of robots
kneath
306
46k
Building Adaptive Systems
keathley
44
2.9k
A designer walks into a library…
pauljervisheath
210
24k
RailsConf 2023
tenderlove
30
1.3k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
330
Transcript
jQuery 快速入门 TechParty@UIC 行之
内容 1. jQuery 的简介及其优势 2. jQuery 的选择器 3. jQuery 的DOM操作
4. jQuery 的事件
jQuery 的简介及其优势
“每多学一点知识,就少写一行代码” ——《锋利的jQuery》 (推荐) 轻量级javaScript类库,简化js操作, 用于快速处理文 档、事件、动画、ajax等。 由John Resig于2006年首次发布, 免费开源。 另有:jQuery
Mobile 、 jQuery UI、 jQuery 插件
" By crawling Alexa top 100 000 websites I found
out that 45% of them use a Javascript framework and among those who use a framework 28% of them use Jquery. " http://goo.gl/rXUGG
兼容多浏览器 强大的选择器 简单的DOM操作 强大的事件处理机制 简化Ajax操作 链式操作(chaining) 面向集合,隐性迭代(implicit iteration) 支持扩展 (jQuery
插件)
调用 Google 提供的 jQuery <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> why? http://goo.gl/IFgGT http://goo.gl/nkVMG
jQuery API查询 http://goo.gl/7X2fo
jQuery 的选择器
常见CSS选择器: 标签选择器 div {......} ID 选择器 #myID {......} 类选择器 .myClass
{......} 后代选择器 #myID div{......} 组群选择器 div, #myID, .myClass {......} jQuery 基本选择器与CSS选择器几乎一样! 在css选择器的基础上添加更多功能。
$ 美刀符号,表示 jQuery jQuery("myID") = $("#myID") document.getElementById("myID") $() ——> 实例化操作函数。
jQuery 基本选择器, 同CSS选择器: $("#myID") 选择id为myID的元素 $(".myClass") 选择class 为 myClass 的元
素 $("span") 选择所有span标签元素 $("span,div") http://goo.gl/xmfKh
除此之外,还有: 层次选择器 过滤选择器 表单选择器 如: $("div:first") 选取文档中第一个div 更多了解请看API文档。
jQuery 的DOM操作
DOM: Document Object Model 文档对象模型 DOM 树 DOM 操作:查找节点、创建节点、删改节点、属性操 作
样式操作等。 http://goo.gl/9o7GF
jQuery 的事件
加载DOM: $(document).ready() 代替 onload 方法 http://goo.gl/rckPE
END THANK YOU
REF: 《锋利的jQuery》