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

The image Object

The last Web browser object to be discussed in this chapter is the image object. One image object is created in a document by each <IMG> tag on the page. These objects are referenced through an image's object array; the object's array has a length property that you can use to find out how many images are present. Table 19.9 shows some of the other properties and events associated with the image object.

Table 19.9. HTML image Object Properties and Events
PropertyWhat It Contains
borderthe value of the BORDER attribute
completeindicates whether the image has been completely loaded
heightthe value of the HEIGHT attribute
hspacethe value of the HSPACE attribute
lowsrcthe value of the LOWSRC attribute
namethe value of the NAME attribute
srcthe value of the SRC attribute
vspacethe value of the VSPACE attribute
widththe value of the WIDTH attribute
EventWhen It Occurs
onAborttriggered when the user aborts the loading of an image, such as by clicking the Stop button
onErrortriggered when an error occurs when an image is being loaded
onLoadtriggered when an image is completely loaded



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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