HTML DOM Image Object>>

Image Object

The Image object represents an HTML img element. For each instance of an HTML <img> tag in a document, an Image object is created.

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

Image Object Properties

Property Description IE F N W3C
align Sets or returns how to align the image according to the surrounding text 5 1 6 Yes
alt Sets or returns an alternate text to write if the image cannot be displayed 5 1 6 Yes
border Sets or returns the width of the border of the image in pixels 4 1 3 Yes
complete Returns a Boolean value that indicates whether or not the browser is finished loading the image 4 1 3 No
height Sets or returns the value of the height attribute of the <img> tag in pixels 4 1 3 Yes
hspace Sets or returns the value of the hspace attribute of the <img> tag in pixels 4 1 3 Yes
id Sets or returns the id of the image (In IE 4 this property is read-only) 4 1   No
isMap Sets or returns a Boolean value that specifies if the image is a server-side image map 5 1 6 Yes
longDesc Sets or returns a URL for a long description of the image 6     Yes
lowsrc Sets or returns a URL to a low-resolution version of the image (for clients with low-resolution) 4 1 3 No
name Sets or returns the value of the name attribute of the <img> tag 4 1 3 Yes
src Sets or returns the URL of the image 4 1 3 Yes
useMap Sets or returns a URL (often with a bookmark extension - #name) to use as a client-side image map 5 1 6 Yes
vspace Sets or returns the value of the vspace attribute of the <img> tag in pixels 4 1 3 Yes
width Sets or returns the value of the width attribute of the <img> tag in pixels 4 1 3 Yes

Image Object Methods

Method Description IE F N W3C
blur() Removes focus from the image 4     No
click() Simulates a mouse-click on the image 4     No
focus() Gives focus to the image 4     No

Image Object Events

Syntax: object.event_name="someJavaScriptCode"

Event Description IE F N W3C
onAbort Executes some code when a user aborts the download of an image 4 1 3  
onBlur Executes some code when the image loses focus 4      
onClick Executes some code when a user clicks on the image 4      
onError Executes some code when an Error occurs 4 1 3  
onFocus Executes some code when the image gets focus 4      
onLoad Executes some code when the image loads 4 1 3  

 

<< Back








   



MSN Nick Name



More Resources...





Most Viewed Services:
  1. HTML Tutorial
  2. XHTML Tutorial
  3. CSS Tutorial
  4. Javascript Tutorial
  5. DHTML Tutorial
  6. VB Script
  7. TCP/IP Tutorial
  8. ADO Tutorial
  9. MYSQL Tutorial
  10. ASP Tutorial
  11. AJAX Tutorial
  12. CFML Tutorial
  13. PHP Tutorial
  14. WML Tutorial
  15. FLASH Tutorial
  16. XML Tutorial
  17. RSS Tutorial
  18. SQL Tutorial
  19. HTML Articles
  1. Javascript Articles
  2. PHP Articles
  3. SEO Articles
  4. Web Design Articles
  5. SEO Tips
  6. Web Design Tips
  7. Articles
  8. CSS
  9. CSS Tips
  10. HTML Tips
  11. JAVASCRIPT Tips
  12. MYSQL Tips
  13. PHP Tips
  14. Money
  15. Tutorials
  16. Web Hosting



  • Home
  • Web Directory
  • Top Directoriers
  • Webmaster Directories
  • Contact
  • © Copyright 2006 All Rights Reserved By CodeDcode.Com