WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Image Object


Image Object

The Image object speaks to a HTML <img> element.

Access an Image Object

You can get to a <img> component by utilizing getElementById():

var x = document.getElementById("myImg");

Create an Image Object

You can make a <img> component by utilizing the document.createElement() method:

var x = document.createElement("IMG");

Image Object Properties

Property Description
align Not bolstered in HTML5. Use style.cssFloat instead.
Sets or returns the estimation of the adjust quality of an image
alt Sets or returns the estimation of the alt quality of an image
border Not upheld in HTML5. Use style.border instead.
Sets or returns the estimation of the fringe property of an image
complete Returns regardless of whether the program is done stacking an image
crossOrigin Sets or returns the CORS settings of an image
height Sets or returns the estimation of the tallness trait of an image
hspace Not bolstered in HTML5. Use style.margin instead.
Sets or returns the estimation of the hspace quality of an image
isMap Sets or returns whether a picture ought to be a piece of a server-side picture map, or not
longDesc Not upheld in HTML5.
Sets or returns the estimation of the longdesc trait of an image
name Not upheld in HTML5. Use id instead.
Sets or returns the estimation of the name quality of an image
naturalHeight Returns the first stature of an image
naturalWidth Returns the first width of an image
src Sets or returns the estimation of the src quality of an image
useMap Sets or returns the estimation of the usemap property of an image
vspace Not bolstered in HTML5. Use style.margin instead.
Sets or returns the estimation of the vspace quality of an image
width Sets or returns the estimation of the width quality of an image

Image Object Events

Event The occasion happens when...
onabort Loading of a picture is interrupted
onerror An blunder happens when stacking an image
onload An picture is done loading


Welookups is optimized for learning.Copy right 2018 - 2019 kumar aditya singh .
All Right Reserved and you agree to have read and accepted our term and condition.
All Rights Reserved.

welookups.com