Chapter 1. Getting Started with JavaScript

In This Chapter

  • Adding JavaScript code to your pages

  • Setting up your environment for JavaScript

  • Creating variables

  • Inputting and outputting with modal dialogs

  • Using Concatenation to build text data

  • Understanding data types

  • Using string methods and properties

  • Using conversion functions

Web pages are defined by the XHTML code and fleshed out by CSS. But to make them move and breathe, sing, and dance, you need to add a programming language or two. If you thought building Web pages was cool, you're going to love what you can do once you do a little programming. Programming is what makes pages interact with the user. Interactivity is the "new" in "new media" (if you ask me, anyway). Learn to program, and your pages come alive.

Sometimes people are nervous about programming. It seems difficult and mysterious, and only super-geeks do it. That's a bunch of nonsense. Programming is no more difficult than XHTML and CSS. It's a natural extension, and you're going to like it.

In this chapter, you discover how to add code to your Web pages. You use a language called JavaScript, which is already built into most Web browsers. You don't need to buy any special software, compilers, or special tools, because you build JavaScript just like XHTML and CSS — in an ordinary text editor or a specialty editor like Aptana.

Working in JavaScript

JavaScript is a programming language first developed by Netscape Communications. It is now standard on nearly every browser. You should ...

Get HTML, XHTML, and CSS All-In-One Desk Reference For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.