English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a folder which contains images

I am looking for a simple code to put in my homepage,

This code will display an image randomly from that folder.

Any one can come up with that code?

2007-01-14 02:26:23 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

5 answers

It depends on what kind of server you are running and whether you can run Java or ASP or CGI or whatever.

That said, the easiest thing is to write a script that has a list of files you want to choose from, and randomly picks one out of that list and puts it up. This is the same way you would do rotating ad banners.

2007-01-14 02:36:10 · answer #1 · answered by T J 6 · 0 1

The CPU "understand" machine code, because the machine code changes the logic on the inputs of various "gates". All code is eventually brought down to machine code, or run by programs that are brought down to machine code.

2016-05-24 00:09:02 · answer #2 · answered by Anonymous · 0 0

Dont worry, javascript will help you here.
Number your images 1,2,3...
Write a random function (Refer this >> http://www.pageresource.com/jscript/jrandom.htm)
Get a random number and then write this
document.write("")

2007-01-14 02:47:13 · answer #3 · answered by Dondakaya G 1 · 0 1

http://www.dougv.com/blog/2007/01/14/display-a-random-image-with-javascript-dom/

2007-01-14 05:06:29 · answer #4 · answered by Anonymous · 0 0

try checking out http://www.dynamicdrive.com/. it might be there

2007-01-14 02:37:41 · answer #5 · answered by nick 5 · 0 1

fedest.com, questions and answers