<% Function RndCode() CodeSet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" AmountSet = 62 ' 这里设他多少个字有什么用 Randomize
' 随机产生字符 Dim vCode(10), vCodes For i = 0 To 9 vCode(i) = Int(Rnd * AmountSet) '为什么要用到数组,不好意思啊,我是菜鸟不要笑我啊 vCodes = vCodes & Mid(CodeSet, vCode(i) + 1, 1) Next RndCode=vCodes End Function
%> <%=RndCode()%>