Adding Image Slideshow on any HTML Webpage / blogger site

A number of web developers face challenge in adding a simple image slideshow in a HTML webpage. There are very tough codes available on net for this task. But most of them demand images to be of same size, or the code is too tough to implement due to usage of css and advanced java script. Here we are proving a simple HTML code with minimal usage of Java script. You can directly use in it your blog post's HTML coding.

Here is the code

<script type="text/javascript">
var x=0;
function rotate(num){
if(x<0) x=fs.length-1;[x].value;
function auto() {
if(document.ff.fa.value == "Stop"){
rotate(++x);setTimeout("auto()", 2000);}}
<form name="ff">
<table cellpadding=3 style="border:1px solid;border-collapse:collapse; border-color:#C0C0C0">
<tr><th align=center>Tourist Places in India</th>
</tr><tr><td align=center>
<img src="" name="show">
<td align=center style="border:1px solid; border-color:#C0C0C0">
<input type="button" onclick="rotate(0);" value="ll<<" title="Jump to Start" />
<input type="button" onclick="rotate(x-1);" value="Previous " title="Previous photo" style="width:80px;" />
<input type="button" name="fa" onClick="this.value=((this.value=='Stop')?'Start':'Stop');auto();" value="Start Slidshow" title="Auto-play" style="width:150px;" />
<input type="button" onclick="rotate(x+1);" value="Next" title="Next Photo" style="width:80px;" />
<input type="button" onclick="rotate(this.form.slide.length-1);" value=">>ll" title="Jump to end" />
<td align=center style="border:1px solid; border-color:#C0C0C0">
<select name="slide" onChange="rotate(this.selectedIndex);">
<option value="">Shimla-Manali </option>
<option value="">Darjeeling</option>
<option value="">Corbett National Park 
<option value="">Kashmir </option>
<option value="">Andman </option>
<option value="">Kerala </option>
<option value="">Tajmahal </option>
<option value="">Goa </option>
<option value="">Ladakh </option>

 The implementation of the above code will provide the following result

Tourist Places in India

If you are smart enough to be a web developer, then you know how to change the code implement it on your website. You can add or delete images by adding or deleting the <option ></option> tag which is in the end part of the code.
Share this Article :

No comments:

Post a Comment