DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Javascript for changing image every 2 seconds (http://www.daniweb.com/forums/thread158529.html)

manaraghu Nov 20th, 2008 7:49 am
Javascript for changing image every 2 seconds
 
Javascript for changing image of image tag every 2 seconds

Drew Nov 20th, 2008 11:48 pm
Re: Javascript for changing image every 2 seconds
 
You know google has TONS of examples of how to do this, but here is something i wrote really fast.

setInterval(function() {
        document.getElementById('ImageID').src='imagepath?rd=' + new Date()
}, 2000)


All times are GMT -4. The time now is 11:22 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC