深入浅出JavaScript

出版时间:2008-8  出版社:东南大学出版社  作者:莫里森  页数:615  
Tag标签:无  

前言

We think of a “Head First” reader as a learner. So what does it take to learn something? First, you have to get it, then make sure you don’t forget it. It’s not about pushing facts into your head. Based on the latest research in cognitive science, neurobiology, and educational psychology, learning takes a lot more than text on a page. We know what turns your brain on. Some of the Head First learning principles: Make it visual. Images are far more memorable than words alone, and make learning much more effective (up to 89% improvement in recall and transfer studies). It also makes things more understandable. Put the words within or near the graphics they relate to, rather than on the bottom or on another page, and learners will be up to twice as likely to solve problems related to the content. Use a conversational and personalized style. In recent studie s, students performed up to 40% better on post-learning tests if the content spoke directly to the reader, using a first-person, conversational style rather than taking a for mal tone. Tell stories instead of lecturing. Use casual language. Don’t take yourself too seriously. Which would you pay more attention to: a stimulating dinner par ty companion, or a lecture? .. Get the learner to think more deeply. In other words, unless you actively flex your neurons, nothing much happens in your head. A reader has to be motivated, engaged, curious, and inspired to solve problems, draw conclusions, and generate new knowledge. And for that, you need challenges, exercises, a nd thought-provoking questions, and activities that involve both sides of the brain and multiple senses. Get—and keep—the reader’s attention. We’ve all had the “I really want to learn this but I can’t stay awake past page one” experience. Your brain pays attention to things that are out of the ordinar y, interesting, strange, eye-catching, unexpected. Learning a new, tough, technical topic doesn’t have to be boring. Your brain will learn much more quickly if it’s not. Touch their emotions. We now know that your ability to remember something is largely dependent on its emotional content. You remember what you care about. You remember when you feel something. No, we’re not talking heart-wrenching stories about a boy and his dog. We’re talking emotions like surprise, curiosity, fun, “what the...?” , and the feeling of “I Rule!” that comes when you solve a puzzle, learn something everybody else thinks is hard, or realize you know something that “I’m more technical than thou” Bob from engineering doesn’t.

内容概要

你将从本书学到什么?  这么说你准备从写HTML和CSS的静态网页跃进到编写动态网络应用程序脚本了?这里就是起点。《深入浅出JavaScript》带你游历令人兴奋的交互式网页创建过程。为了启发你的思考,本书覆盖了所有的JavaScript基本知识,从基本网络编程技巧,如变量、函数和循环语句,到高级一些的专题,如表单验证、DOM操作、客户端对象、脚本程序调试——甚至Ajax!赶快做好准备,快速响应的网站离你只有几页书那么远。    使用JavaScript帮助人们与iRock交互  理解如何用模式匹配来验证表单数据   使用为你定制的调试终端来调试代码  解决需要兼顾面向对象和数据驱动的博客网站困境   使用DOM操作你的网页  并在一次网上历险中追踪你所作决策的历史  为什么这本书看起来如此不同?  我们认为你的时间如此宝贵以至于不应该花费在为新概念伤脑筋上面。《深入浅出JavaScript》用最新的认知科学和学习理论打造多感官的学习体验,它运用丰富的视觉样式激发你的大脑工作,而不是密密麻麻的文字让你看了昏昏欲睡。

作者简介

作者:(美国)莫里森 (Michael Morrison)

书籍目录

Intro  Who is this book for?  We know what you're thinking  Metacognition  Bend your brain into submission  Read me  The technical review team  Acknowledgments1 the interactive web: Reacting to the Virtual World  (Online) people have needs Like talking to a brick wall...nothing happens ButJavaScript talks back Lights, camera, interaction! Use the  tag to tell the browser you're writingJavaScript Your web browser can handle HTML, CSS, AND JavaScript Man's virtual best Friend... needs YOUR help Making iRock interactive Create the iRock web page Test drive JavaScript events: giving the iRock a voice Alerting the user with a function Add the iRock greeting Now let's make the iRock really interactive Interaction is TWO-way communication Add a thnction to get the user's name Instant replay: what just happened? Test drive iRock 1.02 storing data: Everything Has Its Place  Your scripts can store data Scripts think in data types Constants stay the SAME, variables can CHANGE Variables start out without a value Initialize a variable with "=" Constants are resistant to change What's in a name? Legal and illegal variable and constant names Variable names often use CamelCase Plan the Duncan's Donuts web page A first take at the donut calculations Initialize your data...or else NaN is NOT a number You can add more than numbers parselnt0 and parseFloat0 convert text to a number Why are extra donuts being ordered? Duncan discovers donut espionage Use getElementByld0 to grab form data Validate the web form's data Strive for intuitive user input3 exploring the client: Browser Spelunking Lucky contestant, come on down! "if" this is true... then do something An if statement evaluates a condition...and then takes action Use if to choose between two things You can make multiple decisions with if Adding an else to your if statement Variables drive the story But part of the story is missing Compounding yourJavaScript efforts Tiered decision making with if/else An if can go inside another if Your functions control your pages Pseudocode lets you map out your adventure Stick figure inequality != Psst, I've got nothing to tell you... Crafting decisions with comparison operators Comments, placeholders, and documentation Comments in.JavaScript start with// Scope and context: Where data lives Check your adventure variable score Where does my data live? Choice of five Nesting it/else can get complicated Swimh statements have multiple cases Inside the switch statement A switchy stick figure adventure: test drive 4 decision making: If There’s a Fork in the Road, Take It  X marks the spot Deja vu all over again...for loops Treasure hunting with a for loop Dissect the tbr loop Mandango: a macho movie seat finder First check seat availability Looping, HTML, and seat availability Movie seats as variables Arrays collect multiple pieces of data Array values are stored with keys FromJavaSeript to HTML Visualizing Mandango seats Test drive: the solo seat finder Too much of a good thing: endless loops Loops always need an exit condition (or two!) A "break" in the action Boolean operator logic uncovered Looping for,just a "while"... until a condition is met Breaking down the while loop Use the right loop for the job Movie seat data modeling An array of an array: two-dimensional arrays Two keys to access 2-D array data Mandango in 2-D An entire theater of manly seats5 looping: At the Risk of Repeating Myself  The mother of all problems Functions as problem solvers The nuts and bolts of a function A function you've already met Building a better thermostat Passing information to fhnctions Function arguments as data Functions eliminate duplicate code Creating a seat setter function The setSeat0 thnction The significance of feedback Returning data from tunctions Many happy return values Getting the status of a seat Showing the seat status You can link the thnction to an image Repetitive code is never a good thing Separating functionality from content Functions are just data Calling or referencing your functions Events, callbacks, and HTML attributes Wiring events using function references Function literals to the rescue Where's the wiring? A shell of an HTML page6 functions: Reduce, Reuse, Recycle  The Bannerocity HTML form When HTML is not enough Accessing form data Form fields follow a chain of events Losing focus with onblur Alert box validation Validate fields to make sure you have "not nothing" Validation without aggravating alert boxes A more subtle non-empty validator Size matters... Validating the length of data Validating a ZIP code Validating a date Regular expressions aren't "regular" Regular expressions define patterns to match Metacharacters represent more than one literal character Drilling into regular expressions: quantifiers Validating data with regular expressions Matching mins and maxes Eliminating three-digit years with this...or that Leave nothing to chance Can you hear me now? Phone number validation You'ye got mail: validating email The exception is the rule Matching optional characters fi'om a set Constructing an email validator7 forms and validation: Getting the User to Tell All 8 wrangling the page: Slicing and Dicing HTML with the DOM 9 bringing data to life: Objects as Frankendata 10 creating custom objects: Having It Your Way with Custom Objects 11 kill bugs dead: Good Scripts Gone Wrong 485 12 dynamic data: Touchy-Feely Web Applications

章节摘录

插图:

媒体关注与评论

“非常实际而且有用,同时也解释得非常清楚。本书在向一个完全新手介绍JavaScript时做得非常出色,并且本书是Head First(深入浅出)系列教学风格的又一见证。与其他关于JavaScript的书相比,用《深入浅出JavaScript》来学习是很棒的,想想其他的参考书都有电话簿那么厚。”——Alex Lee, 学生,休斯敦大学(University of Houston)“一个初级JavaScript开发人员的完美选择。”——Fletcher Moore, 网络开发人员和设计者,乔治亚理工学院(Georgia Institute of Technology)“经典‘深入浅出’系列里又一本伟大的书。”——TW Scannell

编辑推荐

《深入浅出JavaScript(影印版)》由东南大学出版社出版。

图书封面

图书标签Tags

评论、评分、阅读与下载


    深入浅出JavaScript PDF格式下载


用户评论 (总计20条)

 
 

  •   一直喜欢head first 的书,讲解细致,看着有趣,不像别的书,看一会就烦了,支持!!!!!!!
  •   书非常不错,适合任何想学习的人看.就是发货太慢
  •   刚收到货 书质量不错,书的也不错、就是英文版,看起来有点吃力。不知道能不能退换啊
  •   这一系列的书都很值得买~
  •   顺便学习下鸟语
  •   headfirst 一贯的清晰明了,但是并不深入,适合初学者
  •   质量很好,送货隔天到,比以前快很多
  •   适合初学者,值得一看。
  •   深入浅出是一系列不错的书
  •   书不错,就像看小说一样,一点也不觉得累,以后还会买这系列的书,不错
  •   本身书我是很喜欢的,但是收到的书好像二手的,哎,很失望的一次,以前都不会。。。
  •   刚在书店里看到《Head First》这个系列的书时,觉得它不可能教会我太多东西——毕竟书里有那么多插图,这看上去也太不像是在学习了——简直就像是在做游戏!然而真的看了几页(当时我看的是《Head First Java》),就放不下了,我这才发现我是被多年来糟糕的学校教育毒害了,以至于难以相信学习可以伴随着乐趣进行。感谢《Head First》系列!这些书让我重新发现自己可以把学习当成是一种享受!从那本《Head First Java》开始,我已经看过了《Head First Servlets & JSP》、《Head First SQL》,还有这本正在看的——《Head First JavaScript》。同样都是经典。当然,既然起名叫《Head First》,那就必然是入门书,这点在你买书前是应该清楚的——不过在入门书中,我实在没见过比《Head First》做的更优秀的了。另外,虽然你也可以等待翻译的版本,但在大多数情况下,影印版更能保持“原汁原味”,所以这本书我给4星,和它在Amazon.com获得的评分一样——很少有完美的书籍,这本已经很不错了!
  •   明明买的是新品,被室友嘲笑说是三手货,里面还有折过的痕迹。。。。。。
  •   这本书很好,阅读过程很有趣
  •   head first系列,没的说了,把所有head first系类收集全,呵呵
  •   只扫了几眼,觉得挺好的。很清晰。比html5的质量好
  •   一本可以开阔思维的书
  •   还能说什么呢?除了好,还是好!
  •   看了headfirst C#以后,觉得好,就买了这本书,我的感觉就是跟标题一样,其他有经验的老鸟或者英文非常一般的人可能不适合。
  •     如作者说所,里面的知识虽然不是大全,但是百分之90都是常用的知识。简单易学,同时领略到函数式编程的特点,是我对本书的评价。
      
      不过读这本书不能成为专家,必须结合其他js书籍。
      比如精通javascript, 或javascript dom编程艺术。
      
      本书对OOjs点到为止,想弄懂这个概念,本书帮不了你。
      高级概念 闭包 也从本书参悟不透。关于闭包,推荐2个帖子。
      http://blog.csdn.net/hitman9099/article/details/3854171
      http://www.cn-cuckoo.com/2007/08/01/understand-javascript-closures-72.html(英文版http://jibbering.com/faq/notes/closures/)
      
      如 啊牛哥说的,边看边动手,才行。
 

250万本中文图书简介、评论、评分,PDF格式免费下载。 第一图书网 手机版

京ICP备13047387号-7