O'Reilly logo

Javascript for the World Wide Web: Visual Quickstart Guide, Fifth Edition by Tom Negrino, Dori Smith

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 5. More Fun with Images

In Chapter 4, you mastered rollovers, the most common usage of JavaScript with images. But you can do much more than rollovers with JavaScript, and that's what you'll find in this chapter.

Images give Web pages life, and you can use JavaScript to automatically change images, create ad banners, build slideshows, display random images on a page, and even use a rollover in conjunction with an image map to give the user some interesting interface choices. Let's get started.

Table 5.1. Just Enough HTML—Images

TAG

ATTRIBUTE

MEANING

map

 

Contains the area elements defining the links and locations for image maps

 

name

The identifier used by the usemap attribute of the img tag

area

 

Defines the elements of the image map

 

shape

Defines ...

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