Home Webboard ArticlesKnowledges  
ข่าวประกาศ:

:: กติกา มารยาท ในการใช้งานเว็บบอร์ด ::
กรุณากรอกอีเมล์จริงในการสมัคร และรับอีเมล์ยืนยันเพื่อใช้งานในบอร์ด

ผู้เขียน หัวข้อ: สำหรับทำภาพสไลด์ ที่หน้า พอทัลครับ เครดิต หมูน้อยครับ  (อ่าน 5704 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ phoenix

  • Just Mem
  • ****
  • กระทู้: 72
  • เห็นด้วย&ขอบคุณ: 30
    • www.moto2hand.net
สำหรับทำภาพสไลด์ ที่หน้า พอทัลครับ เครดิต หมูน้อยครับ

เปลี่ยนเฉพาะที่อยู่ของรูปนะครับ




โค๊ด: [Select]
<center><table>
  <t>
    <td><!-- saved from url=(0022)http://internet.e-mail -->
<script language="JavaScript">
<!--

/* Here you make an array with all the URL's of the images you would like to have in your slideshow.*/

var image1 = new Array[color=crimson][font=Verdana]("http://www.moto2hand.net/smfm/banner/Pretty/553000012070411.jpg",
"http://www.moto2hand.net/smfm/banner/Pretty/553000012070413.jpg",
"http://www.moto2hand.net/smfm/banner/Pretty/553000012070418.jpg",
"http://www.moto2hand.net/smfm/banner/Pretty/553000012070419.jpg",
"http://www.moto2hand.net/smfm/banner/Pretty/553000017096303.jpg",
"http://www.moto2hand.net/smfm/banner/Pretty/553000017887814.jpg",
"http://www.moto2hand.net/smfm/banner/Pretty/553000017887818.jpg",
"http://www.moto2hand.net/smfm/banner/Pretty/553000017887819.jpg")[/font][/color]
var imgNumber1=1

/* This number is used to refer to a value of the Array and to know what image should be shown next. */


var numberOfImg1 = image1.length

/* This is the total amount of images you use, it is used to determine if the imgNumber can still grow. */


/* Now it's time to make the functions for the next and previous buttons */

function previousImage1(){
  if(imgNumber1 > 1){
imgNumber1--
    }

/* The if statement is used to know if you aren't already at the first image, because if you are, imgNumber may not decrease. */
 
  else{
  imgNumber1 = numberOfImg1
}

/* If you already are at the first image, and you click the previous button, the slideshow must show the last image. */

  document.slideImage1.src = image1[imgNumber1-1]
  
/* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }

function nextImage1(){
  if(imgNumber1 < numberOfImg1){
imgNumber1++
    }

/* The if statement is used to know if you aren't already at the last image, because if you are, imgNumber may not increase. */

  else{
   imgNumber1 = 1
}

/* If you already are at the last image, and you click the next button, the slideshow must show the first image. */

  document.slideImage1.src = image1[imgNumber1-1]
  
/* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }
  
  
/* Now it is time for the code that preloads the images. */

/* Check if your browser supports the Image Object. */


   var ret = setInterval('nextImage1()',2000);
//-->
</script>
<img src="http://www.proglogic.com/learn/javascript/BSD.jpg" name="slideImage1"><br />
<a href="JavaScript:previousImage1()">Previous</a>|<a href="JavaScript:nextImage1()">Next</a>

</td>
    <td><!-- saved from url=(0022)http://internet.e-mail -->

<script language="JavaScript">
<!--

/* Here you make an array with all the URL's of the images you would like to have in your slideshow.*/

var image2 = new Array[color=firebrick]("http://www.moto2hand.net/smfm/banner/Car/1.jpg",
"http://www.moto2hand.net/smfm/banner/Car/2.jpg",
"http://www.moto2hand.net/smfm/banner/Car/3.jpg",
"http://www.moto2hand.net/smfm/banner/Car/4.jpg",
"http://www.moto2hand.net/smfm/banner/Car/8.jpg",
"http://www.moto2hand.net/smfm/banner/Car/post-1018-1280422475.jpg",
"http://www.moto2hand.net/smfm/banner/Car/proton-jebat-concept-01_728.jpg",
"http://www.moto2hand.net/smfm/banner/Car/proton-jebat-concept-04_728.jpg")[/color]var imgNumber2=1

/* This number is used to refer to a value of the Array and to know what image should be shown next. */


var numberOfImg2 = image2.length

/* This is the total amount of images you use, it is used to determine if the imgNumber can still grow. */


/* Now it's time to make the functions for the next and previous buttons */

function previousImage2(){
  if(imgNumber2 > 1){
imgNumber2--
    }

/* The if statement is used to know if you aren't already at the first image, because if you are, imgNumber may not decrease. */
 
  else{
  imgNumber2 = numberOfImg2
}

/* If you already are at the first image, and you click the previous button, the slideshow must show the last image. */

  document.slideImage2.src = image2[imgNumber2-1]
  
/* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }

function nextImage2(){
  if(imgNumber2 < numberOfImg2){
imgNumber2++
    }

/* The if statement is used to know if you aren't already at the last image, because if you are, imgNumber may not increase. */

  else{
   imgNumber2 = 1
}

/* If you already are at the last image, and you click the next button, the slideshow must show the first image. */

  document.slideImage2.src = image2[imgNumber2-1]
  
/* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }
  
  
/* Now it is time for the code that preloads the images. */

/* Check if your browser supports the Image Object. */


   var ret = setInterval('nextImage2()',2000);
//-->
</script>

<img src="http://www.proglogic.com/learn/javascript/BSD.jpg" name="slideImage2"><br />
<a href="JavaScript:previousImage2()">Previous</a>|<a href="JavaScript:nextImage2()">Next</a>

    </td>
  </tr>
</table>
</center>
« แก้ไขครั้งสุดท้าย: 13, กรกฎาคม 2011, 08:56:17 AM โดย phoenix »



ออฟไลน์ phoenix

  • Just Mem
  • ****
  • กระทู้: 72
  • เห็นด้วย&ขอบคุณ: 30
    • www.moto2hand.net
สำหรับเพิ่มภาพ สไลด์ อีกชุดครับ

โค๊ด: [Select]

/* The if statement is used to know if you aren't already at the last image, because if you are, imgNumber may not increase. */

  else{
  imgNumber3 = 1
}

/* If you already are at the last image, and you click the next button, the slideshow must show the first image. */

  document.slideImage3.src = image3[imgNumber3-1]
 
/* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }
 
 
/* Now it is time for the code that preloads the images. */

/* Check if your browser supports the Image Object. */


   var ret = setInterval('nextImage3()',2000);
//-->
</script>
<img src="http://www.proglogic.com/learn/javascript/BSD.jpg" name="slideImage3"><br />
<a href="JavaScript:previousImage3()">Previous</a>|<a href="JavaScript:nextImage3()">Next</a>

</td>
    <td><!-- saved from url=(0022)http://internet.e-mail -->

<script language="JavaScript">
<!--

/* Here you make an array with all the URL's of the images you would like to have in your slideshow.*/

var image4 = new Array("http://www.moto2hand.net/smfm/banner/Sponser/Kosana.jpg", "http://www.moto2hand.net/smfm/banner/Sponser/watch2.jpg",
"http://www.moto2hand.net/smfm/banner/Sponser/Kosana4.jpg",
"http://www.moto2hand.net/smfm/banner/Sponser/mittare.jpg",
"http://www.moto2hand.net/smfm/banner/Sponser/Kosana3.jpg",
"http://www.moto2hand.net/smfm/banner/Sponser/minorport.jpg",
"http://www.moto2hand.net/smfm/banner/Sponser/Kosana2.jpg",
"http://www.moto2hand.net/smfm/banner/Sponser/minor1.jpg",
"http://www.moto2hand.net/smfm/banner/Sponser/Kosana1.jpg",
"http://www.moto2hand.net/smfm/banner/Sponser/chang.jpg")
var imgNumber4=1

/* This number is used to refer to a value of the Array and to know what image should be shown next. */


var numberOfImg4 = image4.length

/* This is the total amount of images you use, it is used to determine if the imgNumber can still grow. */


/* Now it's time to make the functions for the next and previous buttons */

function previousImage4(){
  if(imgNumber4 > 1){
imgNumber4--
    }

/* The if statement is used to know if you aren't already at the first image, because if you are, imgNumber may not decrease. */
 
  else{
  imgNumber4 = numberOfImg4
}

/* If you already are at the first image, and you click the previous button, the slideshow must show the last image. */

  document.slideImage4.src = image4[imgNumber4-1]
 
/* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }

function nextImage4(){
  if(imgNumber4 < numberOfImg4){
imgNumber4++
    }

/* The if statement is used to know if you aren't already at the last image, because if you are, imgNumber may not increase. */

  else{
  imgNumber4 = 1
}

/* If you already are at the last image, and you click the next button, the slideshow must show the first image. */

  document.slideImage4.src = image4[imgNumber4-1]
 
/* Load the image into the document. Don't forget to write imgNumber-1, an array always starts from 0! */
  }
 
 
/* Now it is time for the code that preloads the images. */

/* Check if your browser supports the Image Object. */


   var ret = setInterval('nextImage4()',2000);
//-->
</script>

<img src="http://www.proglogic.com/learn/javascript/BSD.jpg" name="slideImage4"><br />
<a href="JavaScript:previousImage4()">Previous</a>|<a href="JavaScript:nextImage4()">Next</a>

    </td>
  </tr>
</table>
</center>

ออฟไลน์ music125500

  • Just Member
  • *****
  • กระทู้: 125
  • เห็นด้วย&ขอบคุณ: 5
    • รับสอนดนตรี
ขอบคุณครับผม

 

Sitemap 1 2 3 4 5 6 7 8 9 10 
Back to top