Quote:
How to make alternating images on HTML code?
Computer programming is the art of being precise, and your question is not. There is at least 3 different things that match what you said.
Server side: you have a lot of images and you want to link a different one each time a client request the page:
- the server code pick a random image each time the page is requested.
- you have a counter and it is incremented each time the page is requested, then save new counter, when at the end of list, go back to first.
Client side:
- in Javascript, you set a timer (every 30 seconds1) which launch a piece of code that replace the image tag with another one. and you have a counter to keep track of last image.
HTML Tutorial[
^]