• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Image

JavaScript 1.1+, JScript 1.0+ Nav3+, IE 3+, Opera3+ Syntax

Core client-side JavaScript object.

Description

The Image object represents an image that was created with the <img> tag. Images can be downloaded and cached dynamically by using the Image() constructor, but they cannot be displayed using the constructor. The constructor takes two optional arguments, width and height. The argument width specifies the width of the image in pixels, while the argument height specifies the height of the image in pixels. If these arguments are larger or smaller than the actual image, the image will be stretched to these dimensions. You have probably noticed that there is no argument specifying the image to load. The image to load is specified using dot notation and the src property after the image constructor has been called. Table 7.31 lists all the properties, methods, and events associated with Image object.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint