Once upon a time, there was … ‘A king!’ my little readers will say right away. No,
children, you are wrong. Once upon a time there was a piece of wood…
—The Adventures of Pinocchio
You can do a lot without JavaScript. Using Hypertext Markup Language (HTML),1
you can produce complex documents that intricately describe the content of a
page—and that content’s meaning—to the minutest detail. Using Cascading Style
Sheets (CSS), you can present that content in myriad ways, with variations as subtle
as a single color, as striking as replacing text with an image.
No matter how you dress it up, though, HTML and CSS can only achieve the static
beauty of the department store mannequin—or at best, an animatronic monstrosity
that wobbles precariously when something moves nearby. With JavaScript, you can
bring that awkward puppet to life, lifting you as its creator from humble shop clerk
to web design mastery!
1 Throughout this book, we’ll refer to HTML and XHTML as just HTML. Which you choose is up to you,
and doesn’t have a much to do with JavaScript. In case it matters to you, the HTML code we’ll present
in this book will be valid XHTML 1.0 Strict.But whether your new creation has the graceful stride of a runway model, or the
shuffling gait of Dr. Frankenstein’s monster, depends as much on the quality of its
HTML and CSS origins as it does on the JavaScript code that brought it to life.
Before we learn to work miracles, therefore, let’s take a little time to review how to
build web sites that look good both inside and out, and see how JavaScript fits into
the picture.
Jumat, 15 Januari 2010
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar