JavaScript image align

WE can assign or read alignment of image by this syntax .
We can assign left, right , top or bottom align the image. Here is an example Source code is here
<title>Demo of Image align in JavaScript</title>
<script language='JavaScript' type='text/JavaScript'>
function move_img(str) {
<img src=images/help.jpg id='i1'>

<input type=button onClick=move_img('left') value='Left'>
<input type=button onClick=move_img('right') value='Right'>

More on JavaScript Image Object
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 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


this is great method, thanks for your post,
but i am using like this.

img.src="captcha-demo.php?rand_number=" + (new Date()).getTime());



Works great and uses minimal code. Thank you!!

Post your comments , suggestion , error , requirements etc here .

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2021 All rights reserved worldwide Privacy Policy Disclaimer