• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

11.3. Introduction to Images

A picture is worth a thousand words. Whether it's a slide show, banner, movie, or photo album, the Web contains a huge collection of images. Any time you buy something online, there is usually an image associated with the item, maybe a small image, and then a bigger image if you want more detail. Whatever it is, a book, a house, a pair of shoes, or a toy, we like to see it before we put it in our virtual shopping cart and pay the money.

Images can be links, clickable image maps, banners, marquees, billboards, or rollovers—you name it. With HTML, the images you load are static, and just sit on the page. They cannot be changed without loading a brand-new page, and loading a lot of images takes time. JavaScript brings a new dimension to working with images. Instead of viewing a static image on the page, now you can create rollovers, slide shows, cycling banners, and more. You can create dynamic images that can be changed on the fly, adding animation and drama to your Web page. Before getting into the fun of images, we will look at how JavaScript views the image. In Chapter 12, “Handling Events,” and Chapter 15, “Dynamic HTML: Style Sheets, the DOM, and JavaScript,” you utilize what you learn here to see the full potential of image creation with JavaScript.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint