JavaScript Front-End Development Case Tutorial cover

JavaScript Front-End Development Case Tutorial

Rating 4.0
Word count
149K words
Chapters
291
ISBN
9787115443182

Tags

Summary

JavaScript is a scripting language widely used in web front-end development, known for being simple, easy to learn, and easy to use. Developing web pages with JavaScript enhances interactivity and provides users with real-time, dynamic interactive experiences. The book has 12 chapters covering a JavaScript quick start, basic syntax, arrays, functions, objects, BOM, DOM, events, regular expressions, Ajax, jQuery, and a 2048 web game. To deepen beginners' understanding, the book pairs systematic, comprehensive explanations with excellent examples that combine multiple concepts. It is suitable as a textbook for undergraduate and vocational computer-related majors, as well as a reference for JavaScript enthusiasts—an excellent read for anyone interested in learning computer programming.

Editor's review

JavaScript Front-End Development by Example, produced by the Heima Programmer authoring team, is a hands-on textbook for JavaScript beginners. Starting from basic JavaScript syntax, it systematically explains core concepts such as variables, data types, functions, objects, and DOM manipulation, with a strong emphasis on example-driven learning: a wealth of examples drawn from real development scenarios help readers understand principles through hands-on practice.

From an editorial perspective, the book's standout value is its clear, staged progression. The first five chapters solidify the language fundamentals; the middle section goes deeper into BOM/DOM and event handling; the final part introduces practical tools such as jQuery and covers some ES6 features. This arrangement lowers the learning curve and is especially suited to self-study. The completeness of the companion resources (such as example code) is another strength that effectively supports practice.

Note, however, that the book was published in 2017. While it covers the mainstream technology of the time, the front-end ecosystem changes rapidly, and emerging frameworks (such as Vue and React) and more modern ES6+ syntax are not covered in depth. It is therefore better as a first systematic, practical guide to front-end development than as a reference for the technological frontier. Overall, for readers who want to quickly build an intuitive understanding of JavaScript and basic front-end development through abundant examples, the book remains a reliable choice with clear structure and solid explanations.

Who it's for

A good fit for

  • People with no programming background who want to learn front-end development systematically
  • Computer-related majors seeking companion examples to support classroom learning
  • Development enthusiasts who need to quickly grasp JavaScript basics for simple page interactivity
  • Entry-level developers hoping to draw practical inspiration from the book's examples

Not a good fit for

  • Readers seeking in-depth coverage of modern front-end frameworks such as React and Vue
  • Senior developers hoping to study advanced JavaScript features and engineering practices in depth

Reading tips

  1. Study the chapters in order and be sure to code every example by hand
  2. Debug examples in an online development environment or local editor in real time to deepen understanding
  3. After the basics, try extending example features or combining multiple concepts in a small project

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. 版权信息
  2. 内容提要
  3. 序言
  4. 前言
  5. 第1章 JavaScript快速入门
  6. 1.1 初识JavaScript
  7. 1.1.1 什么是JavaScript
  8. 1.1.2 JavaScript的由来
  9. 1.1.3 JavaScript的特点
  10. 1.1.4 JavaScript与ECMAScript的关系
  11. 1.2 开发工具
  12. 1.2.1 浏览器
  13. 1.2.2 代码编辑器
  14. 1.2.3 案例 第一个JavaScript程序
  15. 1.3 JavaScript入门
  16. 1.3.1 JavaScript引入方式
  17. 1.3.2 常用输出语句
  18. 1.3.3 注释
  19. 1.3.4 数据与运算
  20. 1.3.5 函数
  21. 1.3.6 对象
  22. 1.3.7 事件
  23. 1.3.8 案例 改变网页背景色
  24. 动手实践 验证用户输入的密码
  25. 本章小结
  26. 课后练习
  27. 第2章 基本语法
  28. 2.1 变量
  29. 2.1.1 标识符
  30. 2.1.2 关键字与保留字
  31. 2.1.3 变量的使用
  32. 2.1.4 变量的赋值
  33. 2.2 数据类型
  34. 2.2.1 数据类型分类
  35. 2.2.2 基本数据类型
  36. 2.2.3 数据类型检测
  37. 2.2.4 数据类型转换
  38. 2.3 表达式
  39. 2.4 运算符
  40. 2.4.1 算术运算符
  41. 2.4.2 字符串运算符
  42. 2.4.3 赋值运算符
  43. 2.4.4 比较运算符
  44. 2.4.5 逻辑运算符
  45. 2.4.6 三元运算符
  46. 2.4.7 位运算符
  47. 2.4.8 运算符优先级
  48. 2.4.9 案例 计算圆的周长和面积
  49. 2.5 流程控制
  50. 2.5.1 选择结构
  51. 2.5.2 循环结构
  52. 2.5.3 跳转语句
  53. 2.5.4 案例 打印金字塔
  54. 动手实践 九九乘法表
  55. 本章小结
  56. 课后练习
  57. 第3章 数组
  58. 3.1 初识数组
  59. 3.2 创建数组
  60. 3.3 数组的基本操作
  61. 3.3.1 获取数组长度
  62. 3.3.2 数组的访问与遍历
  63. 3.3.3 元素的添加与修改
  64. 3.3.4 元素的删除
  65. 3.3.5 案例 查找最大值与最小值
  66. 3.4 常见二维数组操作
  67. 3.4.1 创建与遍历
  68. 3.4.2 案例 二维数组转置
  69. 3.5 数组排序
  70. 3.5.1 冒泡排序
  71. 3.5.2 插入排序
  72. 3.6 常见数组方法
  73. 3.6.1 栈方法
  74. 3.6.2 检索方法
  75. 3.6.3 数组转字符串
  76. 3.6.4 其他方法
  77. 3.6.5 案例 猴子选大王
  78. 动手实践 省份城市的三级联动
  79. 本章小结
  80. 课后练习
  81. 第4章 函数
  82. 4.1 函数的定义与调用
  83. 4.1.1 初识函数
  84. 4.1.2 参数设置
  85. 4.1.3 函数的调用
  86. 4.1.4 案例 字符串大小写转换
  87. 4.2 变量的作用域
  88. 4.3 匿名函数
  89. 4.3.1 函数表达式
  90. 4.3.2 匿名函数
  91. 4.3.3 回调函数
  92. 4.4 嵌套与递归
  93. 4.4.1 函数嵌套与作用域链
  94. 4.4.2 递归调用
  95. 4.4.3 案例 求斐波那契数列第N项的值
  96. 4.5 闭包函数
  97. 4.5.1 什么是闭包函数
  98. 4.5.2 闭包函数的实现
  99. 动手实践 网页计算器
  100. 本章小结
  101. 课后练习
  102. 第5章 对象
  103. 5.1 面向对象概述
  104. 5.1.1 面向过程与面向对象
  105. 5.1.2 面向对象的特征
  106. 5.2 自定义对象
  107. 5.2.1 对象的定义
  108. 5.2.2 访问对象成员
  109. 5.2.3 对象成员遍历
  110. 5.2.4 深拷贝与浅拷贝
  111. 5.3 构造函数
  112. 5.3.1 为什么使用构造函数
  113. 5.3.2 JavaScript内置的构造函数
  114. 5.3.3 自定义构造函数
  115. 5.3.4 私有成员
  116. 5.3.5 函数中的this指向
  117. 5.4 内置对象
  118. 5.4.1 String对象
  119. 5.4.2 Number对象
  120. 5.4.3 Math对象
  121. 5.4.4 Date对象
  122. 5.4.5 案例 制作年历
  123. 5.5 错误处理与代码调试
  124. 5.5.1 错误处理
  125. 5.5.2 错误对象
  126. 5.5.3 错误类型
  127. 5.5.4 代码调试
  128. 5.6 原型与继承
  129. 5.6.1 原型
  130. 5.6.2 继承
  131. 5.6.3 静态成员
  132. 5.6.4 属性搜索原则
  133. 5.6.5 原型链
  134. 动手实践 表单生成器
  135. 本章小结
  136. 课后练习
  137. 第6章 BOM
  138. 6.1 什么是BOM对象
  139. 6.2 window对象
  140. 6.2.1 全局作用域
  141. 6.2.2 弹出对话框和窗口
  142. 6.2.3 窗口位置和大小
  143. 6.2.4 框架操作
  144. 6.2.5 定时器
  145. 6.2.6 案例 限时秒杀
  146. 6.3 location对象
  147. 6.3.1 更改URL
  148. 6.3.2 获取URL参数
  149. 6.3.3 案例 定时跳转
  150. 6.4 history对象
  151. 6.4.1 历史记录跳转
  152. 6.4.2 无刷新更改URL地址
  153. 6.5 navigator对象
  154. 6.6 screen对象
  155. 动手实践 红绿灯倒计时
  156. 本章小结
  157. 课后练习
  158. 第7章 DOM
  159. 7.1 DOM对象简介
  160. 7.1.1 什么是DOM
  161. 7.1.2 DOM HTML节点树
  162. 7.1.3 DOM对象的继承关系
  163. 7.2 HTML元素操作
  164. 7.2.1 获取操作的元素
  165. 7.2.2 元素内容
  166. 7.2.3 案例 改变盒子大小
  167. 7.2.4 元素属性
  168. 7.2.5 元素样式
  169. 7.2.6 案例 标签栏切换效果
  170. 7.3 文档节点操作
  171. 7.3.1 获取节点
  172. 7.3.2 节点追加
  173. 7.3.3 节点删除
  174. 7.3.4 案例 列表的增删和移动
  175. 动手实践 购物车
  176. 本章小结
  177. 课后练习
  178. 第8章 事件
  179. 8.1 事件处理
  180. 8.1.1 事件概述
  181. 8.1.2 事件的绑定方式
  182. 8.2 事件对象
  183. 8.2.1 获取事件对象
  184. 8.2.2 常用属性和方法
  185. 8.2.3 案例 缓动的小球
  186. 8.3 事件分类
  187. 8.3.1 页面事件
  188. 8.3.2 焦点事件
  189. 8.3.3 鼠标事件
  190. 8.3.4 案例 鼠标拖曳特效
  191. 8.3.5 键盘事件
  192. 8.3.6 表单事件
  193. 动手实践 图片放大特效
  194. 本章小结
  195. 课后练习
  196. 第9章 正则表达式
  197. 9.1 认识正则表达式
  198. 9.1.1 什么是正则表达式
  199. 9.1.2 如何使用正则
  200. 9.1.3 获取正则对象
  201. 9.2 字符类别与集合
  202. 9.2.1 字符类别
  203. 9.2.2 字符集合
  204. 9.2.3 案例 限定输入内容
  205. 9.3 字符限定与分组
  206. 9.3.1 字符限定
  207. 9.3.2 括号字符
  208. 9.3.3 正则运算符优先级
  209. 9.3.4 案例 内容查找与替换
  210. 9.4 与正则相关的方法
  211. 9.4.1 RegExp类中的方法
  212. 9.4.2 String类中的方法
  213. 动手实践 表单验证
  214. 本章小结
  215. 课后练习
  216. 第10章 Ajax
  217. 10.1 Web基础知识
  218. 10.1.1 Web服务器
  219. 10.1.2 HTTP
  220. 10.2 Web服务器搭建
  221. 10.2.1 PHP开发环境
  222. 10.2.2 前后端交互
  223. 10.3 Ajax入门
  224. 10.3.1 什么是Ajax
  225. 10.3.2 创建Ajax对象
  226. 10.3.3 Ajax向服务器发送请求
  227. 10.3.4 处理服务器返回的信息
  228. 10.4 数据交换格式
  229. 10.4.1 XML数据格式
  230. 10.4.2 JSON数据格式
  231. 10.4.3 案例 无刷新分页
  232. 10.5 跨域请求
  233. 10.5.1 Ajax跨域问题
  234. 10.5.2 JSONP实现跨域请求
  235. 10.6 扩展技术
  236. 10.6.1 Cookie
  237. 10.6.2 Form Data
  238. 10.6.3 Promise
  239. 10.6.4 WebSocket
  240. 动手实践 进度条文件上传
  241. 本章小结
  242. 课后练习
  243. 第11章 jQuery
  244. 11.1 jQuery快速入门
  245. 11.1.1 什么是jQuery
  246. 11.1.2 下载jQuery
  247. 11.1.3 使用jQuery
  248. 11.2 元素操作
  249. 11.2.1 jQuery对象
  250. 11.2.2 jQuery选择器
  251. 11.2.3 元素遍历
  252. 11.2.4 元素内容
  253. 11.2.5 元素样式
  254. 11.2.6 元素筛选
  255. 11.2.7 元素属性
  256. 11.2.8 案例 折叠菜单
  257. 11.3 文档节点操作
  258. 11.3.1 节点追加
  259. 11.3.2 节点替换
  260. 11.3.3 节点删除
  261. 11.3.4 节点复制
  262. 11.3.5 案例 左移与右移
  263. 11.4 事件操作
  264. 11.4.1 常用事件
  265. 11.4.2 页面加载事件
  266. 11.4.3 事件绑定与切换
  267. 11.4.4 案例 手风琴效果
  268. 11.5 动画特效
  269. 11.5.1 常用动画
  270. 11.5.2 自定义动画
  271. 11.5.3 案例 无缝轮播图
  272. 11.6 jQuery操作Ajax
  273. 11.7 插件机制
  274. 11.7.1 自定义插件
  275. 11.7.2 jQuery插件库
  276. 11.7.3 jQuery UI
  277. 11.7.4 案例 自定义全选与反选插件
  278. 本章小结
  279. 课后练习
  280. 第12章 网页版2048小游戏
  281. 12.1 游戏功能展示
  282. 12.2 实现步骤分析
  283. 12.3 游戏功能实现
  284. 12.3.1 设计游戏界面
  285. 12.3.2 控制游戏数值
  286. 12.3.3 实现单元格移动
  287. 12.3.4 设置游戏分数
  288. 12.3.5 判断胜利和失败
  289. 12.3.6 重新开始游戏
  290. 本章小结
  291. 课后练习

FAQ

Is this book suitable for someone with no programming experience at all?
The book starts from the most basic JavaScript syntax and includes many examples, making it relatively friendly to beginners. Programming does require some logical thinking, so studying basic computer concepts alongside is recommended.
Is the example code in the book outdated?
The examples are based on the technology environment before 2017. Core syntax and basics such as DOM manipulation are not outdated and still have learning value, but for specific tools or APIs, consult the current official documentation for comparison.
What level can I reach after finishing this book?
You will be able to grasp basic JavaScript syntax, perform common DOM operations and event handling, and use tools such as jQuery to create simple front-end interactions—laying the necessary foundation for learning modern front-end frameworks.

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

Heima Programmer is an IT education brand and textbook-writing team under Itcast (Chuanzhi Education), initiated by Zhang Xiaoxiang. It has long focused on developing practical textbooks in areas such as Java, Python, front-end development, and big data, with many of its works published by Posts & Telecom Press. As a collectively credited author, Heima Programmer is not a single individual but a writing team centered on teaching and course development, and its works emphasize hands-on practice and project-driven learning. The library contains 26 of its titles, including representative works such as Software Testing, Modern Methods of Python Programming, Fundamentals of Microservice Architecture (Spring Boot+Spring Cloud+Docker), Java Web Programming Task Tutorial, JavaScript Front-End Development Case Tutorial, Web Design and Production Project Tutorial (HTML+CSS+JavaScript), PHP Basic Case Tutorial, and Java EE Enterprise Application Development Tutorial (Spring+Spring MVC+MyBatis). These works cover categories such as programming design, software learning, computer fundamentals, and examinations. Its writing style relies on cases and task guidance to serve IT learners at both introductory and advanced levels. Public information is limited, so no further biographical details are provided beyond the above.

More by the same author

Top rated in the same category