Image offsetLeft & offsetTopWe can get the position of an image by reading its offset values. We will get two positions one is offsetLeft and other one is offsetTop. offsetLeft give us distance of the image from left edge of the screen. Same way offsetTop give us the distance of the image from top edge of the screen. We will use getElementById to get the image object and its positions. Here is the code.
In the above code i1 is the image , To read out value of offsetTop and offsetLeft we will use one Div layer and display the values inside it. Here is the code.
This article is written by plus2net.com team.
Image SlideShow Script using navigational buttons
Image Loading to cache while page load by Image object
Reloading the image without refreshing the page
Image Rotator Script for automatic Slideshow
Image Move across by button click
Image Move continuously across screen
Image offSetLeft and offSetTop to get position of the image from left and top
Image Position : Positioning an image by assigning value to style.top and style.left
Image width: Managing width of the image
Image height: managing height of the image
Image align: Image align left or right
Image border: adding and removing border from Image
Image alt: updating or reading alt message of image