Image : HTMLElement

An image in an HTML document.

Browser/User Agent Support

IEMozillaNetscapeOperaSafari
4.0+1.0+3.0+7.0+1.0+

Constructors

ConstructorIEMozillaNetscapeOperaSafari
Creates a new instance of an Image object.
4.0+1.0+3.0+7.0+1.0+
 

Properties

PropertyIEMozillaNetscapeOperaSafari
Event handler for when a user aborts the loading of the image.
4.0+1.0+3.0+7.0+1.0+
 
Event handler for when the loading of the image causes an error.
4.0+1.0+3.0+7.0+1.0+
 
Event handler for when the image loads.
4.0+1.0+3.0+7.0+1.0+
 
Width (in pixels) of the image border.
4.0+1.0+3.0+7.0+1.0+
 
Specifies whether the image is completely loaded or not.
4.0+1.0+3.0+7.0+1.0+
 
Height (in pixels) of the image.
 
Amount of horizontal space (in pixels) to insert to the left and the right of the image.
4.0+1.0+3.0+7.0+1.0+
 
URL for an alternate image to display if a user has a low-resolution monitor.
4.0+1.0+3.0+nono
 
Name of the image.
 
URL of the image.
4.0+1.0+3.0+7.0+1.0+
 
Amount of vertical space (in pixels) to insert at the top and bottom of the image.
4.0+1.0+3.0+7.0+1.0+
 
Width (in pixels) of the image.
4.0+1.0+3.0+7.0+1.0+
 

Availability

JavaScript 1.1 | W3C

Constructor Detail

Image Image()

Creates a new instance of an Image object.

Visibility
internal

Property Detail

static Function onabort

Event handler for when a user aborts the loading of the image.

Availability

JavaScript 1.1

static Function onerror

Event handler for when the loading of the image causes an error.

Availability

JavaScript 1.1

static Function onload

Event handler for when the image loads.

See Also

Event | EventListener | EventTarget

Availability

JavaScript 1.1

Number border

Width (in pixels) of the image border.

Availability

W3C

Boolean complete

Specifies whether the image is completely loaded or not.

Number height

Height (in pixels) of the image.

Availability

W3C

Number hspace

Amount of horizontal space (in pixels) to insert to the left and the right of the image.

Availability

W3C

String lowsrc

URL for an alternate image to display if a user has a low-resolution monitor.

Availability

W3C

String name

Name of the image.

Availability

W3C

String src

URL of the image.

Availability

W3C

Number vspace

Amount of vertical space (in pixels) to insert at the top and bottom of the image.

Availability

W3C

Number width

Width (in pixels) of the image.

Availability

W3C