O'Reilly logo

HTML, XHTML, & CSS All-in-One For Dummies®, 2nd Edition by Andy Harris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 with 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 such as Aptana.

Working in JavaScript

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required