|
图片数组随机排列
能够把一个图片数组随机排列并且显示。
This is a simple class that can be used to create ads that rotate according
to a random order. The class takes an array of image files name strings as
parameter but it could also be HTML tags for rich media ads. Then it
shuffles the numbers assigned to each ad array position in a way that the
shuffled array does not contain repeated ad numbers. It displays
randomized images from a group of specified images, without repetition.
Finally the class can return a new array of ads sorted by order determined
by the shuffled ad numbers array. The returned array can be used to display one
or more ads in the same page.
>>示例
|
 |