Displaying Random Image on Blog. Here is the java script to make a random image. The image will change randomly display is opened or if the blog refresh browser, according to the images that we have set the link.
Please copy and paste into a module or add the gadget html or javascript on your blog, you live change of address / link (green) according to which the images are, then change the number array(3), according to the number of pictures posted. and add images [3], images [4]... and so on.
<p align="center"><script language="JavaScript"><!--
//store the quotations in arrays
images = new Array(3);
images[0] = "<a > <img src='http://lh4.ggpht.com/_2Y5OzRWKtE0/SWXAnSSR0_I/AAAAAAAAAGg/9CcFf9OzOCM/01.jpg' ></a>";
images[1] = "<a > <img src='http://lh4.ggpht.com/_2Y5OzRWKtE0/SWXAnUxZmdI/AAAAAAAAAGo/fnw5sGhmOz0/02.jpg' ></a>";
images[2] = "<a > <img src='http://lh6.ggpht.com/_2Y5OzRWKtE0/SWXAnYiD40I/AAAAAAAAAGw/oEUqlTQhQvs/03.jpg' ></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
// --></script><br/></p>
For image storage, at this moment a lot of services free web album, you can use picasa web albums, photobucket, flicker and so on. Well, Displaying Random Image on Blog finished. [Business Blog SEO]
Please copy and paste into a module or add the gadget html or javascript on your blog, you live change of address / link (green) according to which the images are, then change the number array(3), according to the number of pictures posted. and add images [3], images [4]... and so on.
<p align="center"><script language="JavaScript"><!--
//store the quotations in arrays
images = new Array(3);
images[0] = "<a > <img src='http://lh4.ggpht.com/_2Y5OzRWKtE0/SWXAnSSR0_I/AAAAAAAAAGg/9CcFf9OzOCM/01.jpg' ></a>";
images[1] = "<a > <img src='http://lh4.ggpht.com/_2Y5OzRWKtE0/SWXAnUxZmdI/AAAAAAAAAGo/fnw5sGhmOz0/02.jpg' ></a>";
images[2] = "<a > <img src='http://lh6.ggpht.com/_2Y5OzRWKtE0/SWXAnYiD40I/AAAAAAAAAGw/oEUqlTQhQvs/03.jpg' ></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
// --></script><br/></p>
For image storage, at this moment a lot of services free web album, you can use picasa web albums, photobucket, flicker and so on. Well, Displaying Random Image on Blog finished. [Business Blog SEO]


0 comments:
Post a Comment
What Do You Think?