您正在使用 IPV4 [44.192.53.34] 访问本站,您本次已经查看了 1 页
用户名: 密 码: 验证码:     用QQ登录本站
首页 软件 编程 笑话 知识 公告 台风 日历 计算器
悟空收录网       [公益]保护绿色环境,构建和谐社会      

【腾讯云】 爆款2核2G3M云服务器首年 61元,叠加红包再享折上折      
[公益] 地球是我家,绿化靠大家      
2024年 清明节 006
2024年 劳动节 033
2025年 元 旦 278
2025年 春 节 306
 
您现在的位置:首页 >> ASP/ASP.net >> 内容
本类新增
本类热门
随机生成文件名的函数
内容摘要: html meta http-equiv='Refresh' content='2' !--  Place this code into an ASP Page and run it! -- code Random FileName Creation %  Function Generator(Length)   dim i, tempS, v   dim ......

<html>

<meta http-equiv="Refresh" content="2">

<!--

Place this code into an ASP Page and run it!

-->

<code>

Random FileName Creation

<%

Function Generator(Length)

dim i, tempS, v

dim c(39)

tempS = ""

c(1) = "a": c(2) = "b": c(3) = "c": c(4) = "d": c(5) = "e": c(6) = "f": c(7) = "g"

c(8) = "h": c(9) = "i": c(10) = "j": c(11) = "k": c(12) = "l": c(13) = "m": c(14) = "n"

c(15) = "o": c(16) = "p": c(17) = "q": c(18) = "r": c(19) = "s": c(20) = "t": c(21) = "u"

c(22) = "v": c(23) = "w": c(24) = "x": c(25) = "y": c(26) = "z": c(27) = "1": c(28) = "2"

c(29) = "3": c(30) = "4": c(31) = "5": c(32) = "6": c(33) = "7": c(34) = "8": c(35) = "9"

c(36) = "-": c(37) = "_": c(38) = "@": c(39) = "!"

If isNumeric(Length) = False Then

Response.Write "A numeric datatype was not submitted to this function."

Exit Function

End If

For i = 1 to Length

Randomize

v = Int((39 * Rnd) + 1)

tempS = tempS & c(v)

Next

Generator = tempS

End Function

For i = 1 to 20

Randomize

x = Int((20 * Rnd) + 1) + 10

Response.Write Generator(x) & "<br>" & vbnewline

Next

%>

</code>

版权声明:本内容来源于网络,如有侵犯您的版权,请联系站长,本站收到您的信息后将及时处理。
上一篇:ASP智能搜索

 

下一篇:用ASP显示ACCESS数据库的的GIF图象

发布日期:2021/6/15
手机扫二维码直达本页
发布时间:12:34:56
点  击:6
录  入:壹家怡园
相关文章
Baidu
YiJiaCMS 7.3.8 build231228(MSSQL) 闽ICP备05000814号-1
本空间由腾讯云(轻量应用服务器)提供,Cloudflare提供加速防护
运行时间载入中.....