深入淺出JavaScript

出版時(shí)間:2008-8  出版社:東南大學(xué)出版社  作者:莫里森  頁(yè)數(shù):615  
Tag標(biāo)簽:無  

前言

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.

內(nèi)容概要

你將從本書學(xué)到什么?  這么說你準(zhǔn)備從寫HTML和CSS的靜態(tài)網(wǎng)頁(yè)躍進(jìn)到編寫動(dòng)態(tài)網(wǎng)絡(luò)應(yīng)用程序腳本了?這里就是起點(diǎn)?!渡钊霚\出JavaScript》帶你游歷令人興奮的交互式網(wǎng)頁(yè)創(chuàng)建過程。為了啟發(fā)你的思考,本書覆蓋了所有的JavaScript基本知識(shí),從基本網(wǎng)絡(luò)編程技巧,如變量、函數(shù)和循環(huán)語(yǔ)句,到高級(jí)一些的專題,如表單驗(yàn)證、DOM操作、客戶端對(duì)象、腳本程序調(diào)試——甚至Ajax!趕快做好準(zhǔn)備,快速響應(yīng)的網(wǎng)站離你只有幾頁(yè)書那么遠(yuǎn)。    使用JavaScript幫助人們與iRock交互  理解如何用模式匹配來驗(yàn)證表單數(shù)據(jù)   使用為你定制的調(diào)試終端來調(diào)試代碼  解決需要兼顧面向?qū)ο蠛蛿?shù)據(jù)驅(qū)動(dòng)的博客網(wǎng)站困境   使用DOM操作你的網(wǎng)頁(yè)  并在一次網(wǎng)上歷險(xiǎn)中追蹤你所作決策的歷史  為什么這本書看起來如此不同?  我們認(rèn)為你的時(shí)間如此寶貴以至于不應(yīng)該花費(fèi)在為新概念傷腦筋上面。《深入淺出JavaScript》用最新的認(rèn)知科學(xué)和學(xué)習(xí)理論打造多感官的學(xué)習(xí)體驗(yàn),它運(yùn)用豐富的視覺樣式激發(fā)你的大腦工作,而不是密密麻麻的文字讓你看了昏昏欲睡。

作者簡(jiǎn)介

作者:(美國(guó))莫里森 (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

章節(jié)摘錄

插圖:

媒體關(guān)注與評(píng)論

“非常實(shí)際而且有用,同時(shí)也解釋得非常清楚。本書在向一個(gè)完全新手介紹JavaScript時(shí)做得非常出色,并且本書是Head First(深入淺出)系列教學(xué)風(fēng)格的又一見證。與其他關(guān)于JavaScript的書相比,用《深入淺出JavaScript》來學(xué)習(xí)是很棒的,想想其他的參考書都有電話簿那么厚?!薄狝lex Lee, 學(xué)生,休斯敦大學(xué)(University of Houston)“一個(gè)初級(jí)JavaScript開發(fā)人員的完美選擇?!薄狥letcher Moore, 網(wǎng)絡(luò)開發(fā)人員和設(shè)計(jì)者,喬治亞理工學(xué)院(Georgia Institute of Technology)“經(jīng)典‘深入淺出’系列里又一本偉大的書?!薄猅W Scannell

編輯推薦

《深入淺出JavaScript(影印版)》由東南大學(xué)出版社出版。

圖書封面

圖書標(biāo)簽Tags

評(píng)論、評(píng)分、閱讀與下載


    深入淺出JavaScript PDF格式下載


用戶評(píng)論 (總計(jì)20條)

 
 

  •   一直喜歡head first 的書,講解細(xì)致,看著有趣,不像別的書,看一會(huì)就煩了,支持!?。。。。?!
  •   書非常不錯(cuò),適合任何想學(xué)習(xí)的人看.就是發(fā)貨太慢
  •   剛收到貨 書質(zhì)量不錯(cuò),書的也不錯(cuò)、就是英文版,看起來有點(diǎn)吃力。不知道能不能退換啊
  •   這一系列的書都很值得買~
  •   順便學(xué)習(xí)下鳥語(yǔ)
  •   headfirst 一貫的清晰明了,但是并不深入,適合初學(xué)者
  •   質(zhì)量很好,送貨隔天到,比以前快很多
  •   適合初學(xué)者,值得一看。
  •   深入淺出是一系列不錯(cuò)的書
  •   書不錯(cuò),就像看小說一樣,一點(diǎn)也不覺得累,以后還會(huì)買這系列的書,不錯(cuò)
  •   本身書我是很喜歡的,但是收到的書好像二手的,哎,很失望的一次,以前都不會(huì)。。。
  •   剛在書店里看到《Head First》這個(gè)系列的書時(shí),覺得它不可能教會(huì)我太多東西——畢竟書里有那么多插圖,這看上去也太不像是在學(xué)習(xí)了——簡(jiǎn)直就像是在做游戲!然而真的看了幾頁(yè)(當(dāng)時(shí)我看的是《Head First Java》),就放不下了,我這才發(fā)現(xiàn)我是被多年來糟糕的學(xué)校教育毒害了,以至于難以相信學(xué)習(xí)可以伴隨著樂趣進(jìn)行。感謝《Head First》系列!這些書讓我重新發(fā)現(xiàn)自己可以把學(xué)習(xí)當(dāng)成是一種享受!從那本《Head First Java》開始,我已經(jīng)看過了《Head First Servlets & JSP》、《Head First SQL》,還有這本正在看的——《Head First JavaScript》。同樣都是經(jīng)典。當(dāng)然,既然起名叫《Head First》,那就必然是入門書,這點(diǎn)在你買書前是應(yīng)該清楚的——不過在入門書中,我實(shí)在沒見過比《Head First》做的更優(yōu)秀的了。另外,雖然你也可以等待翻譯的版本,但在大多數(shù)情況下,影印版更能保持“原汁原味”,所以這本書我給4星,和它在Amazon.com獲得的評(píng)分一樣——很少有完美的書籍,這本已經(jīng)很不錯(cuò)了!
  •   明明買的是新品,被室友嘲笑說是三手貨,里面還有折過的痕跡。。。。。。
  •   這本書很好,閱讀過程很有趣
  •   head first系列,沒的說了,把所有head first系類收集全,呵呵
  •   只掃了幾眼,覺得挺好的。很清晰。比html5的質(zhì)量好
  •   一本可以開闊思維的書
  •   還能說什么呢?除了好,還是好!
  •   看了headfirst C#以后,覺得好,就買了這本書,我的感覺就是跟標(biāo)題一樣,其他有經(jīng)驗(yàn)的老鳥或者英文非常一般的人可能不適合。
  •     如作者說所,里面的知識(shí)雖然不是大全,但是百分之90都是常用的知識(shí)。簡(jiǎn)單易學(xué),同時(shí)領(lǐng)略到函數(shù)式編程的特點(diǎn),是我對(duì)本書的評(píng)價(jià)。
      
      不過讀這本書不能成為專家,必須結(jié)合其他js書籍。
      比如精通javascript, 或javascript dom編程藝術(shù)。
      
      本書對(duì)OOjs點(diǎn)到為止,想弄懂這個(gè)概念,本書幫不了你。
      高級(jí)概念 閉包 也從本書參悟不透。關(guān)于閉包,推薦2個(gè)帖子。
      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/)
      
      如 啊牛哥說的,邊看邊動(dòng)手,才行。
 

250萬(wàn)本中文圖書簡(jiǎn)介、評(píng)論、評(píng)分,PDF格式免費(fèi)下載。 第一圖書網(wǎng) 手機(jī)版

京ICP備13047387號(hào)-7