asp数组随机排序
2008-11-26 20:47
260 查看
<script type="text/javascript"><!--
google_ad_client = "pub-4490194096475053";
/* 内容页,300x250,第一屏 */
google_ad_slot = "3685991503";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>功能:将一个数组打乱它的顺序,显示出来,让每一次显示出来的顺序都不一样。
<%
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
%>
google_ad_client = "pub-4490194096475053";
/* 内容页,300x250,第一屏 */
google_ad_slot = "3685991503";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>功能:将一个数组打乱它的顺序,显示出来,让每一次显示出来的顺序都不一样。
<%
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
%>
相关文章推荐
- asp数组随机排序
- asp数组随机排序
- asp数组随机排序
- 转 :asp教程.net c#数组遍历、排序、删除元素、插入、随机元素 数组遍历
- asp数组随机排序
- asp 数组排序函数
- JS 数组随机排序
- js数组随机排序
- php数组随机排序实现方法
- js实现数组内元素随机排序
- 将一维数组中元素随机打乱排序
- Angularjs实现数组随机排序
- 定义一个有10个空间的整型数组,数组中的每个位置存放8-98之间的随机偶数, 输出这个数组中的每个数,再排序,排序后再输出。
- 数组随机排序
- 随机产生20个正整数存入数组a中,且每个数均在1000-9999之间(包含1000和9999)。对数组进行排序,要求按每个数的后三位的大小进行升序排列,然后取出满足此条件的前10个数放入数组b中,如果
- 随机产生20个正整数存入数组a中,且每个数均在1000-9999之间(包含1000和9999)。对数组进行排序,要求按每个数的后三位的大小进行升序排列,然后取出满足此条件的前10个数放入数组b中,如果
- js 数组随机排序
- 数组随机排序
- 随机10个100到200之间的整数,将这些数放入数组中,打印数组,再使用 3种排序。
- 对li类数组对象随机添加特性,并进行排序