按小到大排序
<script language=vbscript>
dim array1(4)
array1(0)=15
array1(1)=5
array1(2)=14
array1(3)=21
array1(4)=2
array3=array1
for i=0 to ubound(array3)-1
for j=i+1 to ubound(array3)
if array3(i)>array3(j) then
tmp=array3(i)
array3(i)=array3(j)
array3(j)=tmp
end if
next
next
for i=0 to ubound(array3)
msgbox array3(i)
next
</script>
原文地址:http://www.cnblogs.com/myhaiou2008/p/3914501.html