asp随机读取其中一个手机号函数

function getsj(str)
dim arrstr,n
arrstr=split(str,",")
if ubound(arrstr)>0 then
Randomize
n=Int((ubound(arrstr)+1 - 0) * Rnd + 0)
getsj=arrstr(n)
else
getsj=""
end if
end function

调用方法:<%=getsj("13600000000,18900000000,18900000000")%>

引用地址:

post by 不懂戀愛魚兒 | 2011年12月14日 | 归档于 [Asp技术]

发表评论

sitemap ƽ̨