<SCRIPT LANGUAGE="Vbscript">
Option Explicit
dim n,result
'//原数
n = "21,5,13,7,11,8,2"
'//结果
result = rndNumber(n,3)
'//Print
document.write result
function rndNumber(o,count)
Randomize
Dim result,r,i
o = split(o,",")
While len(result) < count*3
r = int(rnd*(Ubound(o)+1))
if Instr(result,","&o(r)&",") < 1 then
result = result & "," & o(r) & ","
end if
Wend
result = mid(result,2,len(result)-2)
result = replace(result,",,",",")
rndNumber = result
end function
</SCRIPT>
============================================