معرفی کتاب «How to do Everything with JavaScript» نوشتهٔ Scott Duffy; NetLibrary, Inc، منتشرشده توسط نشر New York در سال 2003. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «How to do Everything with JavaScript» در دستهٔ بدون دستهبندی قرار دارد.
The book supposes that readers don't know anything about HTML and JavaScript so it introduces HTML and JavaScript at the same time. Also, it covers most JavaScript features and gives you some simple examples. If you are new to HTML and JavaScript, this is the right book for you. You can know the basics of JavaScript very quickly. Since this book only introdcues "how to do some things with JavaScript". And if you really want to know "how to do everything with JavaScript", " JavaScript & DHTML Cookbook" might be the book you should buy. Cover......Page 1 Contents......Page 10 Acknowledgments......Page 16 Introduction......Page 18 PART I Learn JavaScript Basics......Page 20 CHAPTER 1 Prepare to Program in JavaScript......Page 22 Learn the History of JavaScript......Page 23 JavaScript Becomes an Official Standard......Page 24 Where JavaScript Is Today......Page 25 Develop JavaScript-Enabled Web Pages......Page 26 Create Server-Based Web Applications......Page 27 JavaScript Development Tools......Page 28 Learn What JavaScript Can and Cannot Do......Page 32 Use JavaScript as a Server-Side Language......Page 33 Decide Which Version of JavaScript to Use......Page 34 Create a JavaScript Template......Page 35 Understand the JavaScript Template......Page 37 Communicate with the User......Page 38 Display an Alert Message......Page 39 Write Text to the Browser Window......Page 40 Learn More about Topics Discussed in this Chapter......Page 41 CHAPTER 2 Learn JavaScript Fundamentals......Page 44 Store Data in Variables......Page 45 Define Variables......Page 46 Define Constants......Page 47 Understand Program Flow......Page 48 Execute Code Conditionally......Page 49 Repeat Statements Using Loops......Page 53 Comment Your Code......Page 62 Set a Default Object......Page 63 Handle Errors......Page 65 Understand the Basics of Expressions......Page 68 Use Operators to Create Complex Expressions......Page 69 Organize Your Code into Functions......Page 70 Define Functions......Page 71 Accept Parameters......Page 73 Understand Variable Scope......Page 75 Return Values......Page 77 Use the Improvements in JavaScript 2.0 to Create More Powerful Functions......Page 78 Use Named Optional Parameters......Page 79 Accept Any Number of Parameters......Page 80 CHAPTER 3 Use Built-in JavaScript Classes......Page 82 Learn about Objects in JavaScript......Page 83 Organize Code into Procedures......Page 84 Use the Object-Oriented Approach......Page 85 Turn Properties and Functions into a Class......Page 87 JavaScript's Built-in Classes and Data Types......Page 88 Instantiate an Object with the new Operator......Page 91 Create a String Object in JavaScript......Page 92 Create a String Object Using a String Literal......Page 93 Use the String Object's Built-in Functionality......Page 95 Perform Mathematical Functions......Page 97 Apply JavaScript's Date-Handling Functions......Page 98 Use the parseInt and parseFloat Functions......Page 101 Prepare Text Before Sending to Web Server......Page 103 Use the escape and unescape Functions......Page 104 Decide When to Use Regular Expressions......Page 105 Understand the Basics of Regular Expressions......Page 106 Create Patterns with a RegExp Object......Page 108 Use the char Data Type......Page 110 Understand Special Data Types......Page 111 CHAPTER 4 Organize Data into Arrays......Page 114 Create an Empty Array......Page 116 Specify an Initial Array Length......Page 118 Use Array Literals......Page 119 Call the Properties and Methods of the Array Object......Page 120 Set and Retrieve Values in an Array......Page 123 Use Multidimensional Arrays......Page 126 Use JavaScript 2.0's Enhanced Arrays......Page 130 The StaticArray Class......Page 131 The ConstArray Class......Page 133 CHAPTER 5 Create Your Own JavaScript Classes......Page 136 Create Objects in JavaScript 1.x......Page 137 Call a Constructor Function......Page 138 Use an Object Literal......Page 141 Extend an Existing Class......Page 142 Extend an Existing Object......Page 144 Create Objects in JavaScript 2.0......Page 145 Define Your Own Classes......Page 146 Organize Classes Using Inheritance......Page 149 Choose Between Static and Instance Members......Page 154 Make Class Members Public or Private......Page 155 PART II Build JavaScript-Enabled Web Sites......Page 158 CHAPTER 6 Embed JavaScript in a Web Page......Page 160 Understand Basic HTML Structure......Page 161 Build an HTML Document......Page 164 Indicate the Document Type with ......Page 165 Add a Title and Define Document Keywords......Page 166 Format Text with HTML Elements......Page 167 Format Text with Style Sheets......Page 169 Use to Add JavaScript to a Web Page......Page 172 Use for Browsers That Don't Support Scripting......Page 173 Load an External JavaScript File......Page 176 Call JavaScript Using Hyperlinks......Page 177 Learn More about the Topics in this Chapter......Page 178 CHAPTER 7 Create Scripts That Work in Every Browser......Page 180 Understand Browser Differences......Page 181 What Kind of Errors Can Occur?......Page 182 Detect What Type of Browser the User Is Running......Page 183 Query the Document Model......Page 188 Stick to Web Standards......Page 189 Write Cross-Browser Code......Page 190 CHAPTER 8 Manipulate Web Forms......Page 198 Understand HTML Forms......Page 199 Request User Input Using an HTML Form......Page 200 Process Form Input with Client-Side JavaScript......Page 201 Process Form Input on a Web Server......Page 202 Insert an HTML Form into a Web Page......Page 203 Access Form Values Using the forms Array......Page 219 Access Form Values Using the elements Array......Page 221 Access Form Values Using getElementsByName()......Page 223 Access Form Values Using getElementsByTagName()......Page 224 CHAPTER 9 Handle Browser Events......Page 226 Write JavaScript Event Handlers......Page 227 Handle User Interface Events......Page 228 Handle Mouse Events......Page 230 Handle Key Events......Page 231 Handle HTML Events......Page 234 Handle Events Using the Event Property......Page 237 Call the Method Associated with an Event......Page 238 Overcome Browser Incompatibility......Page 239 CHAPTER 10 Communicate Between Browser Frames......Page 242 Learn the Basics of HTML Frames......Page 243 Create a Frameset in HTML......Page 244 Define and Name Frames in a Frameset......Page 252 Call JavaScript Functions from Other Frames......Page 254 Access Another Frame Using JavaScript......Page 255 Call a JavaScript Function Located in Another Frame......Page 256 Handle Synchronization Between Frames......Page 258 CHAPTER 11 Interact with the Web Browser......Page 262 Learn the Basics of the Document Object Model......Page 264 Manipulate the Contents of a Web Page......Page 267 Dynamically Modify the Contents of a Web Page......Page 268 Change the Items in a Drop-Down List Box......Page 270 Examine the Entire Browser Window......Page 271 Retrieve Properties of the Web Browser Software......Page 273 Examine the Operating System's Display Settings......Page 275 Access the Web Browser History List......Page 276 Send the Browser to a New Location......Page 277 CHAPTER 12 Perform Simple Animation......Page 278 Learn the Basics of Cascading Style Sheets......Page 279 Assign Style to Web Pages Using HTML Elements......Page 280 Assign Style to Web Pages Using Style Sheets......Page 283 Position Elements on a Web Page......Page 287 Modify Styles Using JavaScript......Page 289 Understand Cross-Platform Issues......Page 291 Dynamically Load Images......Page 293 Make Content Move Around the Screen......Page 295 PART III Take JavaScript to the Next Level......Page 298 CHAPTER 13 Debug JavaScript Programs......Page 300 Understand the Possible Causes of Errors......Page 301 Find the Source of an Error Message......Page 303 Interpret Error Messages......Page 304 Add Debugging Code to Your Programs......Page 306 Use the JavaScript Console......Page 309 Use a JavaScript Debugger......Page 310 CHAPTER 14 Make Your Program Errorproof......Page 314 Learn the Basics of Exceptions......Page 315 Catch Exceptions Using the try and catch Statements......Page 316 Understand Exception Bubbling......Page 318 Use the IE Error Object......Page 320 Use Nonstandard finally Clauses......Page 321 Create Exceptions Using the throw Statement......Page 323 Design Programs That Are Easy to Debug from the Start......Page 325 Break Code into Manageable Chunks......Page 326 Reuse Code Using Classes and Objects......Page 327 Create a Testing Harness......Page 328 Force Errors to Test Error-Handling Code......Page 330 Try Your Program in Many Different Environments......Page 331 CHAPTER 15 Use JavaScript to Manage Browser Plug-Ins......Page 332 Include Sun Java Applets......Page 334 Connect to Java Applets Using JavaScript......Page 338 Embed Movies and Music in Web Pages......Page 340 Connect to Music and Media Objects Using JavaScript......Page 341 Use the Microsoft Calendar Control in Your Web Pages......Page 343 APPENDIX A HTML 4.01 Tags......Page 346 APPENDIX B JavaScript Quick Reference......Page 350 Index......Page 354 Team DDU How to Do Everything with JavaScript 1 Cover 1 Contents 10 Acknowledgments 16 Introduction 18 PART I Learn JavaScript Basics 20 CHAPTER 1 Prepare to Program in JavaScript 22 Learn the History of JavaScript 23 The Origin of JavaScript 24 JavaScript Makes Its Way into Internet Explorer 24 JavaScript Becomes an Official Standard 24 Where JavaScript Is Today 25 Choose a Development Environment 26 Develop JavaScript-Enabled Web Pages 26 Create Server-Based Web Applications 27 Use JavaScript in a DOS or Windows Environment 28 JavaScript Development Tools 28 Learn What JavaScript Can and Cannot Do 32 Use JavaScript as a Client-Side Language 33 Use JavaScript as a Server-Side Language 33 Decide Which Version of JavaScript to Use 34 Test JavaScript Programs Using HTML 35 Create a JavaScript Template 35 Understand the JavaScript Template 37 Communicate with the User 38 Display an Alert Message 39 Write Text to the Browser Window 40 Learn More about Topics Discussed in this Chapter 41 CHAPTER 2 Learn JavaScript Fundamentals 44 Understand Basic Terminology 45 Store Data in Variables 45 Define Variables 46 Define Constants 47 Understand Program Flow 48 Control Program Flow with Statements 49 Execute Code Conditionally 49 Repeat Statements Using Loops 53 Comment Your Code 62 Set a Default Object 63 Handle Errors 65 Understand the Basics of Expressions 68 Use Operators to Create Complex Expressions 69 Organize Your Code into Functions 70 Define Functions 71 Accept Parameters 73 Understand Variable Scope 75 Return Values 77 Use the Improvements in JavaScript 2.0 to Create More Powerful Functions 78 Use Named Optional Parameters 79 Accept Any Number of Parameters 80 CHAPTER 3 Use Built-in JavaScript Classes 82 Learn about Objects in JavaScript 83 Write Unstructured Programs 84 Organize Code into Procedures 84 Separate a Program into Modules 85 Use the Object-Oriented Approach 85 Turn Properties and Functions into a Class 87 JavaScript's Built-in Classes and Data Types 88 Instantiate an Object with the new Operator 91 Access an Object with the Operator 92 Access an Object with the [] Operator 92 Create a String Object in JavaScript 92 Create a String Object Using a String Literal 93 Create a String Object Using the String Data Type 95 Use the String Object's Built-in Functionality 95 Perform Mathematical Functions 97 Apply JavaScript's Date-Handling Functions 98 Convert Strings into Numbers 101 Use the parseInt and parseFloat Functions 101 Prepare Text Before Sending to Web Server 103 Use the escape and unescape Functions 104 Decide When to Use Regular Expressions 105 Understand the Basics of Regular Expressions 106 Create Patterns with a RegExp Object 108 Understand JavaScript 2.0's Powerful New Data Types 110 Use the Boolean, Integer, and Number Data Types 110 Use the char Data Type 110 Use the Object Data Type 111 Understand Special Data Types 111 CHAPTER 4 Organize Data into Arrays 114 Create an Array Object 116 Create an Empty Array 116 Specify an Initial Array Length 118 Create and Initialize an Array in One Line of Code 119 Use Array Literals 119 Call the Properties and Methods of the Array Object 120 Set and Retrieve Values in an Array 123 Use Multidimensional Arrays 126 Use JavaScript 2.0's Enhanced Arrays 130 The StaticArray Class 131 The DynamicArray Class 133 The ConstArray Class 133 CHAPTER 5 Create Your Own JavaScript Classes 136 Learn about Classes in JavaScript 137 Create Objects in JavaScript 1.x 137 Call a Constructor Function 138 Use an Object Literal 141 Extend an Existing Class 142 Extend an Existing Object 144 Create Objects in JavaScript 2.0 145 Define Your Own Classes 146 Organize Classes Using Inheritance 149 Choose Between Static and Instance Members 154 Make Class Members Public or Private 155 PART II Build JavaScript-Enabled Web Sites 158 CHAPTER 6 Embed JavaScript in a Web Page 160 Understand Basic HTML Structure 161 Build an HTML Document 164 Indicate the Document Type with 165 Add a Title and Define Document Keywords 166 Format Text with HTML Elements 167 Format Text with Style Sheets 169 Use to Add JavaScript to a Web Page 172 Use for Browsers That Don't Support Scripting 173 Load an External JavaScript File 176 Call JavaScript Using Hyperlinks 177 Learn More about the Topics in this Chapter 178 CHAPTER 7 Create Scripts That Work in Every Browser 180 Understand Browser Differences 181 What Kind of Errors Can Occur? 182 Detect What Type of Browser the User Is Running 183 Query the Document Model 188 Stick to Web Standards 189 Write Cross-Browser Code 190 CHAPTER 8 Manipulate Web Forms 198 Understand HTML Forms 199 Request User Input Using an HTML Form 200 Process Form Input with Client-Side JavaScript 201 Process Form Input on a Web Server 202 Insert an HTML Form into a Web Page 203 Retrieve and Set Form Control Values in JavaScript 219 Access Form Values Using the forms Array 219 Access Form Values Using the elements Array 221 Access Form Values Using getElementById() 223 Access Form Values Using getElementsByName() 223 Access Form Values Using getElementsByTagName() 224 CHAPTER 9 Handle Browser Events 226 Write JavaScript Event Handlers 227 Handle User Interface Events 228 Handle Mouse Events 230 Handle Key Events 231 Handle HTML Events 234 Handle Events Using the Event Property 237 Trigger Events in JavaScript 238 Call the Method Associated with an Event 238 Use the fireEvent Method 239 Overcome Browser Incompatibility 239 CHAPTER 10 Communicate Between Browser Frames 242 Learn the Basics of HTML Frames 243 Create a Frameset in HTML 244 Define and Name Frames in a Frameset 252 Call JavaScript Functions from Other Frames 254 Access Another Frame Using JavaScript 255 Call a JavaScript Function Located in Another Frame 256 Handle Synchronization Between Frames 258 CHAPTER 11 Interact with the Web Browser 262 Learn the Basics of the Document Object Model 264 Manipulate the Contents of a Web Page 267 Dynamically Modify the Contents of a Web Page 268 Change the Items in a Drop-Down List Box 270 Examine the Entire Browser Window 271 Retrieve Properties of the Web Browser Software 273 Examine the Operating System's Display Settings 275 Access the Web Browser History List 276 Send the Browser to a New Location 277 CHAPTER 12 Perform Simple Animation 278 Learn the Basics of Cascading Style Sheets 279 Assign Style to Web Pages Using HTML Elements 280 Assign Style to Web Pages Using Style Sheets 283 Use Basic Style Attributes 287 Position Elements on a Web Page 287 Modify Styles Using JavaScript 289 Understand Cross-Platform Issues 291 Perform Basic Animation Using JavaScript 293 Dynamically Load Images 293 Make Content Move Around the Screen 295 PART III Take JavaScript to the Next Level 298 CHAPTER 13 Debug JavaScript Programs 300 Understand the Possible Causes of Errors 301 Find the Source of an Error Message 303 Interpret Error Messages 304 Use a JavaScript Validator 306 Add Debugging Code to Your Programs 306 Use the JavaScript Console 309 Use a JavaScript Debugger 310 CHAPTER 14 Make Your Program Errorproof 314 Learn the Basics of Exceptions 315 Catch Exceptions Using the try and catch Statements 316 Understand Exception Bubbling 318 Use the IE Error Object 320 Use Netscape-Only catch Clauses 321 Use Nonstandard finally Clauses 321 Create Exceptions Using the throw Statement 323 Design Programs That Are Easy to Debug from the Start 325 Avoid Unstructured Programming 326 Break Code into Manageable Chunks 326 Reuse Code Using Classes and Objects 327 Test Your JavaScript Code Thoroughly 328 Create a Testing Harness 328 Force Errors to Test Error-Handling Code 330 Try Your Program in Many Different Environments 331 CHAPTER 15 Use JavaScript to Manage Browser Plug-Ins 332 Insert Scriptable Objects into HTML Web Pages 334 Include Sun Java Applets 334 Connect to Java Applets Using JavaScript 338 Embed Movies and Music in Web Pages 340 Connect to Music and Media Objects Using JavaScript 341 Use the Microsoft Calendar Control in Your Web Pages 343 APPENDIX A HTML 4.01 Tags 346 APPENDIX B JavaScript Quick Reference 350 Index 354
bring Interactivity To Any Web Site With This Easy-to-follow Guidebook On Javascript. Author Scott Duffy Takes The Fear Out Of Working With A Programming Language By Delivering Instruction And Theory In Manageable Doses, Along With Practical Examples And Plenty Of Ready-to-use Code. Learn To Write A Program By Exploring Statements, Variables, And Functionsthe Three Basic Building Blocks Of Any Program. Use Javascript As The Behind-the-scenes Director Of Your Web Browser Presentation. Create Basic And Advanced Javascript Applicationsplus, Modify Existing Scripts To Suit Your Needsall With The Help Of This Great Resource.
- write Your Own Program Using Statements, Variables, And Functions
- learn The History Of The Language And What It Can Do For You
- enable Movement And Interactivity For Your Web Site
- determine Which Version Of Javascript Is Right For You
- store Dates, Numbers, And More With Built-in Classes
- create Scripts That Work In Every Browser
- understand The Basics Of Expressions, And Organize Your Code Into Functions
- cause Text Or Graphics To Change On Mouse Rollovers
- automatically Change A Formatted Date On A Web Page
- coordinate Objects And Events Seamlessly With Built-in Or Scripted Classes
library Journal
javascript's Popularity Shows No Signs Of Waning, So Libraries Could Benefit From Up-to-date Titles. A Clear And Cohesive Guide Recommended For Beginners And All Libraries, Visual Quickstart Updates Older Editions With Coverage Of V.1.5, Showing How To Complete Common Tasks Step By Step, With Typical And Plentiful Tips, Screen Shots, And Tables. A Companion Web Site (www.javascriptworld.com) At The Time Of This Review Included Only Scripts From The Fourth Edition But Should Soon Be Updated To Include Current Cut-and-paste Scripts And Files. Appendixes Address Javascript Genealogy And Reference, Reserved Words, Css, And Additional Resources. Everything, Also Appropriate For Beginners And All Libraries, Covers Similar Ground But With More Background And Fewer Figures. Notes, Cautions, Sidebars, Tables, And Figures Break Up The Text; Appendixes Provide Quick References For Html Tags And Javascript Statements, Classes, And Objects. For Intermediate To Advanced Users, Cookbook Jumps Right Into Coding Examples. Each Recipe Contains A Problem, Solution, Discussion, And Useful See Also References; The Book's Coverage Of Common How-to Questions Ranges From Concatenating Strings To Embedding Xml Data In Web Pages. Cookbook's Discussion Of Both Javascript And Dhtml And Clear Explanations Of Common Coding Issues Make It A Fantastic Reference For Larger Libraries. Copyright 2003 Reed Business Information.
Publisher's Note: Products purchased from Third Party sellers are not guaranteed by the publisher for quality, authenticity, or access to any online entitlements included with the product. This friendly, solutions-oriented guide is filled with step-by-step examples that illustrate how to write basic to advanced JavaScript applications, as well as modify existing scripts to suit individual needs. Each chapter begins with the specific how-to topics that will be covered. Within the chapter, each topic is accompanied by a solid, easy-to-follow walkthrough of the process. A helpful introduction to Javacript explains how to add interactivity to one's Web sites with JavaScript 1.X and the new 2.0, offering instruction in how to write basic and advanced JavaScript applications, how to modify and customize existing scripts, and more. Original. (Beginner)