Platform Support
IE | Mozilla | Netscape | Opera | Safari | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
---|
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
Image Constructor() : Image
Creates a new instance of an Image object.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ | ||
Image() : ImageCreates a new instance of an Image object. Returns
|
Inherited Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
onclick
: Object
Event handler for when a user clicks on the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
ondblclick
: Object
Event handler for when a user double-clicks the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onhelp
: Object
Event handler for when a user requests Help.
|
Show Details | 3.0+ | no | no | no | no |
|
||||||
onkeydown
: Object
Event handler for when a user presses a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onkeypress
: Object
Event handler for when a user presses and releases a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onkeyup
: Object
Event handler for when a user releases a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmousedown
: Object
Event handler for when a user clicks the mouse button.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmousemove
: Object
Event handler for when a user moves the mouse.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseout
: Object
Event handler for when a user moves the mouse off of the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseover
: Object
Event handler for when a user moves the mouse over the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseup
: Object
Event handler for when a user releases the mouse button.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
List of all elements within the current element. Behaves similarly to document.all.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
The direct child elements of the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
className
: String
The CSS class that the element belongs to.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Reference to the Document object that contains the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
id
: String
Identifier used to assign a unique name to the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
HTML text that the element contains. (Does not include opening and closing tags of the element.)
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Plain text that the element contains. (Does not include opening and closing tags of the element.)
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
lang
: String
lang attribute of the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Height (in pixels) of the element and its contents.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
offsetLeft
: Object
Horizontal position (in pixels) of the element relative to the offsetParent container element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
offsetParent
: Object
Container element used as a reference for the offsetLeft and offsetTop elements.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Vertical position (in pixels) of the element relative to the offsetParent container element.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Width (in pixels) of the element and its contents.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
HTML text that the element contains, including its start and end tags.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
Plain text that the element contains, including its start and end tags.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
Element that is the direct parent of the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
Index of the current element in document.all.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
Inline CSS style attributes for the element.
|
No Details | 4.0+ | 1.0+ | 4.0+ | 7.0+ | 1.0+ |
|
||||||
HTML tag name for the element.
|
No Details | 5.5+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
title
: String
Title attribute of the HTML tag for the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
static onabort
: Function
Event handler for when a user aborts the loading of the image.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
||||||
static onerror
: Function
Event handler for when the loading of the image causes an error.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
||||||
static onload
: Function
Event handler for when the image loads.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
||||||
border
: Number
Width (in pixels) of the image border.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
||||||
Specifies whether the image is completely loaded or not.
|
No Details | 4.0+ | 1.0+ | 3.0+ | 7.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+ | 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 |
|
||||||
name
: String
Name of the image.
|
Show Details | |||||
|
||||||
src
: String
URL of the image.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.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+ | 1.0+ |
|
||||||
width
: Number
Width (in pixels) of the image.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
Inherited Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
contains(Object target) : Boolean
Determines whether the current element contains the target HTML element.
|
Show Details | 4.0+ | no | no | no | no | ||||||||
Parameters
Returns
|
||||||||||||||
getAttribute(String name) : String
Gets the value of the specified attribute.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
||||||||||||||
handleEvent() : Object
Calls the event handler for the specified event.
|
Show Details | no | no | 6.0+ | no | no | ||||||||
Returns
|
||||||||||||||
insertAdjacentHTML(String where, Object text) : void
Inserts HTML text in the specified location within or next to the element.
|
Show Details | 5.0+ | no | no | 7.0+ | no | ||||||||
Parameters
Returns
|
||||||||||||||
insertAdjacentText(String where, Object text) : void
Inserts plain text in the specified location within or next to the element.
|
Show Details | 5.0+ | no | no | 7.0+ | no | ||||||||
Parameters
Returns
|
||||||||||||||
removeAttribute(String name) : Attribute
Deletes the specified attribute from the element.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
||||||||||||||
scrollIntoView([Boolean top]) : void
Scrolls the current document so that the top of current element is either at the top of the display area, or the bottom of
the element is at the bottom of the display area.
|
Show Details | 4.0+ | 1.0+ | 7.0+ | no | no | ||||||||
Parameters
Returns
|
||||||||||||||
setAttribute(String name, Object value) : Object
Sets the specified attribute to the specified value for the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
Availability
JavaScript 1.1|W3C