没有合适的资源?快使用搜索试试~ 我知道了~
首页[JavaScript高阶]Javascript Cookbook(2nd)
[JavaScript高阶]Javascript Cookbook(2nd)
需积分: 10 15 下载量 172 浏览量
更新于2023-05-25
评论
收藏 9.46MB PDF 举报
[JavaScript高阶]Javascript Cookbook(2nd) JavaScript高阶实例原版书
资源详情
资源评论
资源推荐
J
AVASCRIPTWEB
J
avaScript Cookbook
ISBN: 978-1-491-90188-5
US $49.99 CAN $57.99
“
A c
omprehensive,
e
xample-
driven
t
our
o
f
t
he
l
anguage
a
nd
i
ts
p
latforms.
”
—Dr. Axel Rauschmayer
a
uthor of Speaking JavaScript
Shelley Powers has been working
with and writing about web tech-
nologies—from the first release
of JavaScript to the latest graphics
and design tools—for more than 18
years. Her recent O’Reilly books have
covered JavaScript, HTML5 media
objects, Ajax, and web graphics.
T
witter: @oreillymedia
facebook.com/oreilly
Problem solving with JavaScript is a lot trickier now that its use has expanded
considerably in size, scope, and complexity. This cookbook has your back,
with recipes for common tasks across the JavaScript world, whether you’re
working in the browser, the server, or a mobile environment. Each recipe
includes reusable code and practical advice for tackling JavaScript objects,
Node, Ajax, JSON, data persistence, graphical and media applications, complex
frameworks, modular JavaScript, APIs, and many related technologies.
Aimed at people who have some experience with JavaScript, the first part
covers traditional uses of JavaScript, along with new ideas and improved
functionality. The second part dives into the server, mobile development,
and a plethora of leading-edge tools. You’ll save time—and learn more
about JavaScript in the process.
Topics include:
Classic JavaScript:
■
A
rrays, functions, and the JavaScript Object
■
A
ccessing the user interface
■
T
esting and accessibility
■
Cr
eating and using JavaScript libraries
■
C
lient-server communication with Ajax
■
R
ich, interactive web eects
JavaScript, All Blown Up:
■
N
ew ECMAScript standard objects
■
U
sing Node on the server
■
M
odularizing and managing JavaScript
■
C
omplex JavaScript frameworks
■
A
dvanced client-server communications
■
V
isualizations and client-server graphics
■
Mob
ile application development
JavaScript Cookbook
SECOND EDITION
Powers
S
helley Powers
J
avaScript
Cookbook
PR
OGRAMMING THE WEB
2n
d Edition
O'REILLY
W
r*5
s
?
1
iimM
/
r,#
i
wm
i
f
»Uf
J
AVASCRIPTWEB
J
avaScript Cookbook
ISBN: 978-1-491-90188-5
US $49.99 CAN $57.99
“
A c
omprehensive,
e
xample-
driven
t
our
o
f
t
he
l
anguage
a
nd
i
ts
p
latforms.
”
—Dr. Axel Rauschmayer
a
uthor of Speaking JavaScript
Shelley Powers has been working
with and writing about web tech-
nologies—from the first release
of JavaScript to the latest graphics
and design tools—for more than 18
years. Her recent O’Reilly books have
covered JavaScript, HTML5 media
objects, Ajax, and web graphics.
T
witter: @oreillymedia
facebook.com/oreilly
Problem solving with JavaScript is a lot trickier now that its use has expanded
considerably in size, scope, and complexity. This cookbook has your back,
with recipes for common tasks across the JavaScript world, whether you’re
working in the browser, the server, or a mobile environment. Each recipe
includes reusable code and practical advice for tackling JavaScript objects,
Node, Ajax, JSON, data persistence, graphical and media applications, complex
frameworks, modular JavaScript, APIs, and many related technologies.
Aimed at people who have some experience with JavaScript, the first part
covers traditional uses of JavaScript, along with new ideas and improved
functionality. The second part dives into the server, mobile development,
and a plethora of leading-edge tools. You’ll save time—and learn more
about JavaScript in the process.
Topics include:
Classic JavaScript:
■
A
rrays, functions, and the JavaScript Object
■
A
ccessing the user interface
■
T
esting and accessibility
■
Cr
eating and using JavaScript libraries
■
C
lient-server communication with Ajax
■
R
ich, interactive web eects
JavaScript, All Blown Up:
■
N
ew ECMAScript standard objects
■
U
sing Node on the server
■
M
odularizing and managing JavaScript
■
C
omplex JavaScript frameworks
■
A
dvanced client-server communications
■
V
isualizations and client-server graphics
■
Mob
ile application development
JavaScript Cookbook
SECOND EDITION
Powers
S
helley Powers
J
avaScript
Cookbook
PR
OGRAMMING THE WEB
2n
d Edition
O'REILLY*
HftsEH
5
4
9 9 9
ESSE
9
781491
M
901885
JavaScript Cookbook, Second Edition
by Shelley Powers
Copyright © 2015 Shelley Powers. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editors: Simon St. Laurent and Brian MacDonald
Production Editor: Kara Ebrahim
Copyeditor: Jasmine Kwityn
Proofreader: Kara Ebrahim
Indexer: Judy McConville
Cover Designer: Ellie Volckhausen
Interior Designer: David Futato
Illustrator: Rebecca Demarest
February 2015:
Second Edition
Revision History for the Second Edition:
2015-01-23: First release
See http://oreilly.com/catalog/errata.csp?isbn=9781491901885 for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. JavaScript Cookbook, Second Edition, the
cover image of a little egret, and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the author have used good faith efforts to ensure that the information and instruc‐
tions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors
or omissions, including without limitation responsibility for damages resulting from the use of or reliance
on this work. Use of the information and instructions contained in this work is at your own risk. If any code
samples or other technology this work contains or describes is subject to open source licenses or the intel‐
lectual property rights of others, it is your responsibility to ensure that your use thereof complies with such
licenses and/or rights.
ISBN: 978-1-491-90188-5
[LSI]
www.it-ebooks.info
Table of Contents
The World of JavaScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Part I. Classic JavaScript
1. The JavaScript Not-So-Simple Building Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Differentiating Between a JavaScript Object, Primitive, and Literal 3
1.2. Extracting a List from a String 7
1.3. Checking for an Existing, Nonempty String 10
1.4. Inserting Special Characters 14
1.5. Replacing Patterns with New Strings 16
1.6. Finding and Highlighting All Instances of a Pattern 18
1.7. Swapping Words in a String Using Capturing Parentheses 22
1.8. Replacing HTML Tags with Named Entities 25
1.9. Converting an ISO 8601 Formatted Date to a Date Object Acceptable
Format 25
1.10. Using Function Closures with Timers 29
1.11. Tracking Elapsed Time 31
1.12. Converting a Decimal to a Hexadecimal Value 32
1.13. Summing All Numbers in a Table Column 33
1.14. Converting Between Degrees and Radians 36
1.15. Find the Radius and Center of a Circle to Fit Within a Page Element 37
1.16. Calculating the Length of a Circular Arc 39
1.17. Using ES6 String Extras Without Leaving Users in the Dirt 40
2. JavaScript Arrays. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.1. Searching Through an Array 43
2.2. Flattening a Two-Dimensional Array with concat() and apply() 45
2.3. Removing or Replacing Array Elements 46
2.4. Extracting a Portion of an Array 48
iii
www.it-ebooks.info
剩余632页未读,继续阅读
basiak
- 粉丝: 1
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0