1 / 7

The Web Wizard’s Guide To JavaScript

This chapter introduces the essential principles of JavaScript, highlighting its importance in web development. You will explore the reasons to learn JavaScript, its historical context, and fundamental concepts such as objects, properties, and events. The document also outlines the Document Object Model (DOM), a critical component for interacting with web pages. With practical examples and source code, you'll gain a foundational understanding of how JavaScript functions and its role within browsers, enhancing your coding skills for creative problem-solving.

frayne
Télécharger la présentation

The Web Wizard’s Guide To JavaScript

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Web Wizard’s Guide To JavaScript Chapter 1 JavaScript Basics

  2. Chapter Objectives • To discover the reasons to learn JavaScript • To learn the history of JavaScript • To master the fundamental concepts • To become familiar with the Document Object Model

  3. Why Learn JavaScript? • Broad support among web browsers • Vast libraries of scripts available online • prototype.js • Applicable to other host environments • Allows use of reusable code libraries • Similar syntax to C, C++, Java, and PHP • Encourages creative problem solving • Ajax

  4. A Little History • Invented by Eich at Netscape in 1995 • Became popular with Navigator 3 • ECMA: a standard emerges

  5. Fundamental Concepts • Objects: The nouns of the language • Instances: incarnations of objects • Properties: attributes of objects • Values: content for properties • Events and Events Handlers • Variables: containers for data • Arrays: ordered collections of data • Methods: The verbs of the language • Operators: Assignment versus Comparison • Functions: groups of statements

  6. The Document Object Model • Internal road map of objects on a web page • Hierarchical model of web browser objects • Old DOMs for Netscape, Microsoft • New browsers use the standard DOM by W3C

  7. Examples • Simple HTML example • Source Code • Simple DOM example one • Source Code • Simple DOM example two • Source Code • Simple JavaScript function example • Source Code

More Related