Cover image for Beginning JavaScript.
Beginning JavaScript.
Title:
Beginning JavaScript.
Author:
McPeak, Jeremy.
ISBN:
9781118903742
Personal Author:
Edition:
5th ed.
Physical Description:
1 online resource (771 pages)
Contents:
Beginning JavaScript® -- CREDITS -- ABOUT THE AUTHORS -- ACKNOWLEDGMENTS -- CONTENTS -- INTRODUCTION -- CHAPTER 1: INTRODUCTION TO JAVASCRIPT AND THE WEB -- Introduction to JavaScript -- What Is JavaScript? -- JavaScript and the Web -- What Can JavaScript Do for Me? -- Tools Needed to Create JavaScript Web Applications -- Development Tools -- Web Browsers -- Where Do My Scripts Go? -- Linking to an External JavaScript File -- Advantages of Using an External File -- Your First Simple JavaScript Program -- Writing More JavaScript -- A Brief Look at Browsers and Compatibility Problems -- Summary -- CHAPTER 2: DATA TYPES AND VARIABLES -- Types of Data in JavaScript -- Numerical Data -- Text Data -- Boolean Data -- Variables-Storing Data in Memory -- Creating Variables and Giving Them Values -- Assigning Variables with the Value of Other Variables -- Using Data-Calculations and Basic String Manipulation -- Numerical Calculations -- Increment and Decrement Operators -- Operator Precedence -- Basic String Operations -- Mixing Numbers and Strings -- Data Type Conversion -- Dealing with Strings That Won't Convert -- Arrays -- A Multi-Dimensional Array -- Summary -- CHAPTER 3: DECISIONS AND LOOPS -- Decision Making-The if and switch Statements -- Comparison Operators -- Precedence -- Assignment versus Comparison -- Assigning the Results of Comparisons -- The if Statement -- Logical Operators -- AND -- OR -- NOT -- Multiple Conditions Inside an if Statement -- else and else if -- Comparing Strings -- The switch Statement -- Executing the Same Code for Different Cases -- Looping-The for and while Statements -- The for Loop -- The for…in Loop -- The while Loop -- The do…while loop -- The break and continue Statements -- Summary -- CHAPTER 4: FUNCTIONS AND SCOPE -- Creating Your Own Functions -- Scope and Lifetime -- Global Scope -- Functional Scope.

Identifier Lookup -- Functions as Values -- Summary -- CHAPTER 5: JAVASCRIPT-AN OBJECT-BASED LANGUAGE -- Object-Based Programming -- What Are Objects? -- Objects in JavaScript -- Using JavaScript Objects -- Creating an Object -- Using an Object's Properties -- Calling an Object's Methods -- Primitives and Objects -- JavaScript's Native Object Types -- String Objects -- The length Property -- Finding a String Inside Another String-The indexOf() and lastIndexOf() Methods -- Copying Part of a String-The substr() and substring() Methods -- Converting Case-The toLowerCase() and toUpperCase() Methods -- Selecting a Single Character from a String-The charAt() and charCodeAt() Methods -- Converting Character Codes to a String-The fromCharCode() Method -- Removing Leading and Trailing Whitespace-The trim() Method -- Array Objects -- Finding Out How Many Elements Are in an Array-The length Property -- Adding Elements-The push() Method -- Joining Arrays-The concat() Method -- Copying Part of an Array-The slice() Method -- Converting an Array into a Single String-The join() Method -- Putting Your Array in Order-The sort() Method -- Putting Your Array into Reverse Order-The reverse() Method -- Finding Array Elements-The indexOf() and lastIndexOf() Methods -- Iterating through an Array without Loops -- The Math Object -- The abs() Method -- Finding the Largest and Smallest Numbers-The min() and max() Methods -- Rounding Numbers -- The random() Method -- The pow() Method -- Number Objects -- The toFixed() Method -- Date Objects -- Creating a Date Object -- Getting Date Values -- Setting Date Values -- Calculations and Dates -- Getting Time Values -- Setting Time Values -- Creating Your Own Custom Objects -- Creating New Types of Objects (Reference Types) -- Defining a Reference Type -- Creating and Using Reference Type Instances -- Summary.

CHAPTER 6: STRING MANIPULATION -- Additional String Methods -- The split() Method -- The replace() Method -- The search() Method -- The match() Method -- Regular Expressions -- Simple Regular Expressions -- Regular Expressions: Special Characters -- Text, Numbers, and Punctuation -- Repetition Characters -- Position Characters -- Covering All Eventualities -- Grouping Regular Expressions -- Reusing Groups of Characters -- The String Object -- The split() Method -- The replace() Method -- The search() Method -- The match() Method -- Using the RegExp Object's Constructor -- Telephone Number Validation -- Validating a Postal Code -- Validating an E-mail Address -- Validating a Domain Name -- Validating a Person's Address -- Validating the Complete Address -- Summary -- CHAPTER 7: DATE, TIME, AND TIMERS -- World Time -- Setting and Getting a Date Object's UTC Date and Time -- Timers in a Web Page -- One-Shot Timer -- Setting a Timer that Fires at Regular Intervals -- Summary -- CHAPTER 8: PROGRAMMING THE BROWSER -- Introduction to the Browser's Objects -- The window Object -- The history Object -- The location Object -- The navigator Object -- The geolocation Object -- The screen Object -- The document Object -- Using the document Object -- The images Collection -- The links Collection -- Determining the User's Browser -- Feature Detection -- Browser Sniffing -- Summary -- CHAPTER 9: DOM SCRIPTING -- The Web Standards -- HTML -- ECMAScript -- The Document Object Model -- The DOM Standard -- Level 0 -- Level 1 -- Level 2 -- Level 3 -- Level 4 -- Browser Compliance with the Standards -- Differences between the DOM and the BOM -- Representing the HTML Document as a Tree Structure -- What Is a Tree Structure? -- An Example HTML Page -- The Core DOM Objects -- Base DOM Objects -- High-Level DOM Objects -- DOM Objects and Their Properties and Methods.

The Document Object and its Methods -- The Element Object -- The Node Object -- Manipulating the DOM -- Accessing Elements -- Changing Appearances -- Using the style Property -- Changing the class Attribute -- Positioning and Moving Content -- Example: Animated Advertisement -- Are We There Yet? -- Performing the Animation -- Summary -- CHAPTER 10: EVENTS -- Types of Events -- Connecting Code to Events -- Handling Events via HTML Attributes -- Handling Events via Object Properties -- The Standard Event Model -- Connecting Code to Events-The Standard Way -- Using Event Data -- Event Handling in Old Versions of Internet Explorer -- Accessing the event Object -- Using Event Data -- Writing Cross-Browser Code -- Native Drag and Drop -- Making Content Draggable -- Creating a Drop Target -- Transferring Data -- Summary -- CHAPTER 11: HTML FORMS: INTERACTING WITH THE USER -- HTML Forms -- Traditional Form Object Properties and Methods -- HTML Elements in Forms -- Common Properties and Methods -- The name Property -- The value Property -- The form Property -- The type Property -- The focus() and blur() Methods -- Button Elements -- Text Elements -- The Text Box -- Problems with Firefox and the blur Event -- The Password Text Box -- The Hidden Text Box -- The textarea Element -- Check Boxes and Radio Buttons -- Selection Boxes -- Adding and Removing Options -- Adding New Options with Standard Methods -- Select Element Events -- HTML5 Form Object Properties and Methods -- New Input Types -- New Elements -- The Element -- The and Elements -- Summary -- CHAPTER 12: JSON -- XML -- JSON -- Simple Values -- Objects -- Arrays -- Serializing Into JSON -- Parsing JSON -- Summary -- CHAPTER 13: DATA STORAGE -- Baking Your First Cookie -- A Fresh-Baked Cookie -- Viewing Cookies in Internet Explorer -- Viewing Cookies in Firefox.

Viewing Cookies in Chrome -- The Cookie String -- name and value -- expires -- path -- domain -- secure -- Creating a Cookie -- Getting a Cookie's Value -- Cookie Limitations -- A User May Disable Cookies -- Number and Information Limitation -- Cookie Security and IE -- Web Storage -- Setting Data -- Getting Data -- Removing Data -- Storing Data as Strings -- Viewing Web Storage Content -- Summary -- CHAPTER 14: AJAX -- What Is Ajax? -- What Can It Do? -- Google Maps -- Google Suggest -- Browser Support -- Using the XMLHttpRequest Object -- Creating an XMLHttpRequest Object -- Using the XMLHttpRequest Object -- Asynchronous Requests -- Creating a Simple Ajax Module -- Planning the HttpRequest Module -- The HttpRequest Constructor -- Creating the send() Method -- The Full Code -- Validating Form Fields with Ajax -- Requesting Information -- The Received Data -- Before You Begin -- A Web Server -- PHP -- Things to Watch Out For -- Security Issues -- The Same-Origin Policy -- CORS -- Usability Concerns -- The Browser's Back Button -- Creating a Back/Forward-Capable Form with an IFrame -- The Server Response -- Dealing with Delays -- Degrade Gracefully When Ajax Fails -- Summary -- CHAPTER 15: HTML5 MEDIA -- A Primer -- Scripting Media -- Methods -- Properties -- Events -- Summary -- CHAPTER 16: JQUERY -- Getting jQuery -- jQuery's API -- Selecting Elements -- Changing Style -- Adding and Removing CSS Classes -- Toggling Classes -- Checking if a Class Exists -- Creating, Appending, and Removing Elements -- Creating Elements -- Appending Elements -- Removing Elements -- Handling Events -- The jQuery Event Object -- Rewriting the Tab Strip with jQuery -- Using jQuery for Ajax -- Understanding the jQuery Function -- Automatically Parsing JSON Data -- The jqXHR Object -- Summary -- CHAPTER 17: OTHER JAVASCRIPT LIBRARIES -- Digging into Modernizr.

Getting Modernizr.
Abstract:
The bestselling JavaScript guide, updated with current features and best practices Beginning JavaScript 5th Edition shows you how to work effectively with JavaScript frameworks, functions, and modern browsers, and teaches more effective coding practices using HTML5. This new edition has been extensively updated to reflect the way JavaScript is most commonly used today, introducing you to the latest tools and techniques available to JavaScript developers. Coverage includes modern coding practices using HTML5 markup, the JSON data format, DOM APIs, the jQuery framework, and more. Exercises with solutions provide plenty of opportunity to practice, and the companion website offers downloadable code for all examples given in the book. Learn JavaScript using the most up to date coding style Understand JSON, functions, events, and feature detection Utilize the new HTML5 elements and the related API Explore new features including geolocation, local storage, and more JavaScript has shaped the Web from a passive medium into one that is rich, dynamic, and interactive. No matter the technology on the server side, it's JavaScript that makes it come alive in the browser. To learn JavaScript the way it's used today, Beginning JavaScript, 5th Edition is your concise guide.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Electronic Access:
Click to View
Holds: Copies: