An image in an HTML document.
Platform Support
| IE | Mozilla | Netscape | Opera | Chrome | Safari | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Chrome | Safari | ||
|---|---|---|---|---|---|---|---|---|---|
|
Image Constructor() : Image
Creates a new instance of an Image object.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ | ||
Image() : ImageCreates a new instance of an Image object. Returns
|
|||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Chrome | Safari |
|---|---|---|---|---|---|---|---|
|
onabort
: Function
Event handler for when a user aborts the loading of the image.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
onerror
: Function
Event handler for when the loading of the image causes an error.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
onload
: Function
Event handler for when the image loads.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
border
: Number
Width (in pixels) of the image border.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
Specifies whether the image is completely loaded or not.
|
No Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|
|||||||
|
height
: Number
Height (in pixels) of the image.
|
Show Details | ||||||
|
|||||||
|
hspace
: Number
Amount of horizontal space (in pixels) to insert to the left and the right of the image.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
lowsrc
: String
URL for an alternate image to display if a user has a low-resolution monitor.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | no | no | no |
|
|||||||
|
name
: String
Name of the image.
|
Show Details | ||||||
|
|||||||
|
src
: String
URL of the image.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
vspace
: Number
Amount of vertical space (in pixels) to insert at the top and bottom of the image.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
width
: Number
Width (in pixels) of the image.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
Availability
JavaScript 1.1|W3C