<%Function MakeRandomizeCode()
' 禁止缓存
Randomize
Dim cAmount,cCode,i
cAmount=36 '文字数量
cCode="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
' 随机产生字符
Dim vCode(4), vCodes
For i = 0 To 3
vCode(i) = Int(Rnd * cAmount)
vCodes = vCodes & Mid(cCode, vCode(i) + 1, 1)
Next
tempNum=year(now) & month(now) & day(now) & hour(now) & minute(now) & second(now) &timer()*100&vCodes
if trim(LCase(session("tempRandomizeCode")))=trim(lcase(tempNum)) then tempNum=MakeRandomizeCode()
session("tempRandomizeCode")=tempNum
MakeRandomizeCode=tempNum
End Function
response.write MakeRandomizeCode()
%>
' 禁止缓存
Randomize
Dim cAmount,cCode,i
cAmount=36 '文字数量
cCode="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
' 随机产生字符
Dim vCode(4), vCodes
For i = 0 To 3
vCode(i) = Int(Rnd * cAmount)
vCodes = vCodes & Mid(cCode, vCode(i) + 1, 1)
Next
tempNum=year(now) & month(now) & day(now) & hour(now) & minute(now) & second(now) &timer()*100&vCodes
if trim(LCase(session("tempRandomizeCode")))=trim(lcase(tempNum)) then tempNum=MakeRandomizeCode()
session("tempRandomizeCode")=tempNum
MakeRandomizeCode=tempNum
End Function
response.write MakeRandomizeCode()
%>