دوستان كسی این اسكریپت رو داره ؟

u3fi

Member
سلام دوستان عزیز دنبال یه اسكریپت میگردم كه بشه باهاش تعداد زیادی متن رو به صورت تصادفی نمایش داد مثلا 200 تا جمله بهش بدی و هر بار كه صفحه لود میشه یكیشو به صورت رندم نمایش بده . ممنون میشم اگه دوستان كمك كنن . :)
 

Mds

Active Member
عکس تصادفی

من در مورد عکس چنین چیزی رو نوشتم
می تونی همین رو تعمیم بدی :
HTML:
function rand_header_image()
{
    var image_address = new Array();
    image_address[0] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285703336.jpg";
    image_address[1] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285703343.jpg";
    image_address[2] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285703340.jpg";
    image_address[3] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285703339.jpg";
    image_address[4] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285703337.jpg";
    image_address[5] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285704644.jpg";
    image_address[6] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285704660.jpg";
    image_address[7] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285704656.jpg";
    image_address[8] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285704653.jpg";
    image_address[9] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285704650.jpg";
    image_address[10] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/285704647.jpg";
    image_address[11] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/287191852.jpg";
    image_address[12] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/287191867.jpg";
    image_address[13] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/287191859.jpg";
    image_address[14] = "http://pic40.picturetrail.com/VOL394/10097435/18181630/287191856.jpg";
    
    var rand = Math.round(Math.random()*14+0);
    
    var image_tag = window.document.getElementById("image_tag");
    image_tag.src = image_address[rand];
    
    //return image_address[rand];
}
 

جدیدترین ارسال ها

بالا