JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Image.width Property

Name

Image.width Property---the width of an image

Availability

Navigator 3.0

Synopsis

image.width

Description

The width property of the Image object is a read-only integer that specifies the width of image. It is set by the WIDTH attribute of the <IMG> HTML tag.

The WIDTH attribute is optional in HTML, but including it greatly improves the layout time of your pages. Also, because of a bug, in Navigator 2.0 all images in a page that contains JavaScript must have WIDTH and HEIGHT attributes specified (even though the Image object is not available in 2.0).

See Also

"Image"


Previous Home Next
Image.vspace Book Index isNaN()

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell