Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
jQuery 快速入门
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
uictechparty
July 08, 2012
Programming
180
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jQuery 快速入门
By xingzhi, 2n TechParty@UIC
uictechparty
July 08, 2012
Transcript
18 slides
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》
More Decks by uictechparty
See All by uictechparty
产品经理是做什么的呢?
uictechparty
1
280
找人
uictechparty
3
490
香港研究生申请经验分享
uictechparty
0
430
css.pdf
uictechparty
1
220
Introduction to Design Patterns
uictechparty
2
210
编写高质量Java代码的7个建议
uictechparty
2
220
视觉障碍出行辅助仪 -The Third Eye
uictechparty
1
200
Introduction to NodeJS
uictechparty
1
240
Introduction to Hadoop
uictechparty
3
250
Other Decks in Programming
See All in Programming
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
190
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
190
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
180
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
370
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
100
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
200
小さなアプリを作って公開するまで
onozaty
0
190
Ruby から Emacs を操作したい
phigasui
0
270
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
390
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
590
Building Flexible Design Systems
yeseniaperezcruz
330
41k
We Have a Design System, Now What?
morganepeng
55
8.4k
Six Lessons from altMBA
skipperchong
29
4.6k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
680
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
570
Raft: Consensus for Rubyists
vanstee
143
7.9k
Being A Developer After 40
akosma
PRO
92
590k
Un-Boring Meetings
codingconduct
0
500
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
300
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Marketing to machines
jonoalderson
1
6k