PDA

View Full Version : استفاده از چند اسلایدر در یک صفحه



sunn789
سه شنبه 05 بهمن 1389, 22:01 عصر
سلام
من تو jquery تازه کارم برا نشان دادن تصویر در بالای سابت ازا ین کد استفاده کردم

<script language="javascript" type="text/javascript">
var imgr = new Array(17);
imgr[0] = new Image();
imgr[0].src = "dates/DatesImage/DSC01281.JPG";
imgr[1] = new Image;
imgr[1].src = "dates/DatesImage/DSC01282.JPG";
imgr[2] = new Image;
imgr[2].src = "dates/DatesImage/DSC01284.JPG";
imgr[3] = new Image;
imgr[3].src = "dates/DatesImage/DSC01286.JPG";
imgr[4] = new Image;
imgr[4].src = "dates/DatesImage/DSC01288.JPG";
imgr[5] = new Image;
imgr[5].src = "dates/DatesImage/DSC01289.JPG";
imgr[6] = new Image;
imgr[6].src = "dates/DatesImage/DSC01291.JPG";
imgr[7] = new Image;
imgr[7].src = "dates/DatesImage/DSC01292.JPG";
imgr[8] = new Image;
imgr[8].src = "dates/DatesImage/DSC01293.JPG";
imgr[9] = new Image;
imgr[9].src = "dates/DatesImage/DSC01296.JPG";
imgr[10] = new Image;
imgr[10].src = "dates/DatesImage/DSC01297.JPG";
imgr[11] = new Image;
imgr[11].src = "dates/DatesImage/DSC01298.JPG";
imgr[12] = new Image;
imgr[12].src = "dates/DatesImage/DSC01299.JPG";
imgr[13] = new Image;
imgr[13].src = "dates/DatesImage/DSC01535.JPG";
imgr[14] = new Image;
imgr[14].src = "dates/DatesImage/DSC01536.JPG";
imgr[15] = new Image;
imgr[15].src = "dates/DatesImage/DSC01537.JPG";
imgr[16] = new Image;
imgr[16].src = "dates/DatesImage/DSC01538.JPG";
var i = 0;
function ff() {
i = Math.floor(Math.random() * 4);
document.getElementById('imgRand').src =
imgr[i].src;
setTimeout('ff()', 5000);
}
</script>


<body style="margin-top:0;margin-left:0;margin:0; background-color:#ffffff" onload= "ff()">

دو تا سوال 1 اینکه اینو چه جوری با بانک اطلاعاتی میتونم انجام بدم
دون اینکه اگه بخوام به قسمت دیگه از همین صفحه یا عکسهای دیگری اسلاید داشتخ باشم در کدم چه تغییری بدم؟؟

رضا قربانی
چهارشنبه 06 بهمن 1389, 11:04 صبح
خب کدهات رو بندازش توی php و به بانک وصل شو و echo''; کن و بعدش رکوردت رو فراخوانی کن - مانند تمامی رکورد هات
ولی برای نمایش تصویر باید اینگوه دریافت کنی



<img src="http://domin/upload/'.$row["pic"].' "/>

sunn789
چهارشنبه 06 بهمن 1389, 14:14 عصر
از جواب شما سپاسگذارم
اما 1- من با php کار نکردم و دوم اینکه سایت رو با aspx و VS2010 کار میکنم
حال بفرمایید چه کنم