PC6下载站

分类分类

ASP数组随机排序的代码

关注+2008-09-11作者:

功能:将一个数组打乱它的顺序,显示出来,让每一次显示出来的顺序都不一样。
<%
Dim tt
tt=Split("1,2,3,4,5,6",",")
'随机排序  
leng=UBound(tt)
randomize  
for ii=0 to leng-1  
 b=int(rnd()*leng)  
 temp=tt(b)  
 tt(b)=tt(ii)  
 tt(ii)=temp
Next
 
For i=0 To leng
 response.write tt(i)&"<br>"
next
%>

展开全部

相关文章

更多+相同厂商

热门推荐

  • 最新排行
  • 最热排行
  • 评分最高
排行榜

    点击查看更多

      点击查看更多

        点击查看更多

        说两句网友评论

          我要评论...
          取消