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

The image Object

The last Web browser object to discuss in this chapter is the image object. One image object is created in a document by each <img/> element 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. XHTML image Object Properties and Events
Property What It Contains
border The value of the border attribute
complete Indicates whether the image has been completely loaded
height The value of the height attribute
hspace The value of the hspace attribute
lowsrc The value of the lowsrc attribute
name The value of the name attribute
src The value of the src attribute
vspace The value of the vspace attribute
width The value of the width attribute
Event When It Occurs
onAbort Triggered when the user aborts the loading of an image, such as by clicking the Stop button
onError Triggered when an error occurs when an image is being loaded
onLoad Triggered 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