我的番茄炒蛋
生活如此精彩,挑战无处不在!

导航

 
<%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) + 11)
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()
%
>
posted on 2005-08-21 20:23  bluesky  阅读(368)  评论(1编辑  收藏  举报