JavaScript Programming for the Absolute Beginner
โ Scribed by Harris, Andy
- Publisher
- Cengage Learning; Course Technology
- Year
- 2002
- Tongue
- English
- Leaves
- 364
- Series
- For the Absolute Beginner (Series)
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
This book not only teachers JavaScript - a great programming 'gateway' language - it also teaches readers the fundamental programming concepts they need to grasp in order to learn any computer language. Plus, it uses game creation as a teaching tool. The goal of the series is adaptive learning. Readers will be able to utilize these skills when learning their next programming language.
โฆ Table of Contents
Contents......Page 7
Introduction......Page 13
CHAPTER 1 Variables, Input, and Output......Page 17
The Project: Name Game......Page 18
Adding Code to HTML......Page 19
Using Variables......Page 21
Getting Input from the User......Page 24
Building More Complicated Text......Page 26
Working with Numbers......Page 27
Using String Methods......Page 32
Summary......Page 35
CHAPTER 2 The Fortune Teller: Random Numbers and the if Statement......Page 37
Getting Random Numbers......Page 38
Making Specialized Random Numbers......Page 40
Making Decisions with the if Statement......Page 44
Using the else Structure......Page 48
Using Nested if Structures......Page 50
Using the switch Structure......Page 54
Returning to the Fortune Program......Page 58
Summary......Page 60
CHAPTER 3 The Number Guesser: for and while Loops......Page 61
Counting Forward......Page 62
Skipping Values......Page 66
Counting Backward......Page 68
Using the while Loop......Page 69
Returning to the Number Guesser......Page 73
Summary......Page 78
CHAPTER 4 The Basic Mad Lib Program and Object-Based Programming......Page 79
The Project: Mad Lib......Page 80
Objects and HTML......Page 81
Reading the Properties of an Object......Page 84
Methods......Page 87
Events......Page 90
The Purpose of Functions......Page 94
Event-Driven Input and Output......Page 95
Back to the Mad Lib Program......Page 100
Summary......Page 104
CHAPTER 5 Advanced Mad Lib: Using the Other Form Elements......Page 105
Working with Textlike Objects......Page 106
Using Check Boxes......Page 109
Using Radio Buttons......Page 113
Using the select Object......Page 118
Using Multiline Select Boxes......Page 121
Returning to the Advanced Mad Lib Program......Page 123
Summary......Page 130
CHAPTER 6 Petals around the Rose: Dynamic Output......Page 131
The Project: Petals around the Rose......Page 132
Generating Output in Frames......Page 134
Displaying Output in Separate Windows......Page 138
Designing the Petals around the Rose Game......Page 143
Creating Graphics for JavaScript Games......Page 145
Generating the Dice-Rolling Routine......Page 149
Summary......Page 153
CHAPTER 7 Image Swapping and Lookup Tables: The Basketball Game......Page 155
The Project: The Basketball Game......Page 156
Swapping Images......Page 157
Using the MouseOver Events......Page 161
Creating Simple Arrays......Page 165
Creating Arrays with Images......Page 168
Using Lookup Tables......Page 171
Putting Together the Basketball Game......Page 176
Summary......Page 184
CHAPTER 8 Dynamic HTML: The Stealth Submarine......Page 187
The Project: The Stealth Submarine Program......Page 188
Dealing with Browser Dependency......Page 189
Using Cascading Style Sheets......Page 192
Working with Positionable CSS Elements......Page 195
Changing the Text in a Positionable Element......Page 201
Adding Cross-Platform Sound......Page 205
Putting It Together in the Stealth Sub Game......Page 208
Summary......Page 216
CHAPTER 9 Sprite Animation: The Racer......Page 219
The Project: The Racer Program......Page 220
Introducing the Sprite......Page 222
Moving Sprites Around......Page 227
Using Frame Animation in Sprites......Page 230
Detecting Collision......Page 234
Creating a Race Timer......Page 237
Returning to the Racer Program......Page 240
Summary......Page 249
CHAPTER 10 Using Other gameLib Features: The Dogfight Game......Page 251
The Project: The Dogfight Game......Page 252
Using Layers and the Keyboard......Page 253
Adding Sound......Page 258
Improving Sprite Management......Page 260
Adding Missiles......Page 266
Returning to the Dogfight Game......Page 268
Summary......Page 275
CHAPTER 11 Cookies and the Mouse: The Jigsaw Puzzle......Page 277
The Project: The Jigsaw Puzzle Program......Page 278
Using the Mouse to Drag and Drop......Page 280
Responding to Button Presses......Page 284
Following the Mouse and Sprites......Page 288
Storing Information in Cookies......Page 291
Creating the Jigsaw Game......Page 295
Summary......Page 304
CHAPTER 12 The Game Creation Process: The Brick Game......Page 305
Creating the Game Design......Page 306
Setting Up the Playground......Page 308
Adding the Paddle......Page 311
Bouncing the Ball off the Paddle......Page 312
Adding Bricks......Page 314
Adding More Bricks and Sound......Page 317
Adding Multiple Game Boards......Page 320
Changing the Bricks' Behavior......Page 323
Adding Scorekeeping Functionality......Page 324
Using a Cookie to Track the High Score......Page 334
Improving the Code Used at the End of Game......Page 335
Summary......Page 336
APPENDIX A: Syntax Reference......Page 337
B......Page 351
C......Page 352
D......Page 353
F......Page 354
H......Page 355
K......Page 356
M......Page 357
O......Page 358
R......Page 359
S......Page 360
V......Page 362
Z......Page 363
๐ SIMILAR VOLUMES
New programmers start here...this book introduces students or aspiring professionals to the world of computer programming using JavaScript and related technologies. This book doesn't just teach the basics of programming, but also all of the tools that new programmers need to get started, including t
JavaScript is a scripting language developed by Netscape to enable Web authors to design interactive sites. JavaScript can interact with HTML source code, enabling Web authors to spice up their sites with dynamic content. JavaScript Programming for the Absolute Beginner not only teaches you JavaScri
JavaScript is a scripting language developed by Netscape to enable Web authors to design interactive sites. JavaScript can interact with HTML source code, enabling Web authors to spice up their sites with dynamic content. JavaScript Programming for the Absolute Beginner not only teaches you JavaScri