加入收藏 | 设为首页 | 会员中心 | 我要投稿 济南站长网 (https://www.0531zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

常用ASP自定义函数集(S.Sams) - ASP教程

发布时间:2016-08-06 02:26:58 所属栏目:Asp教程 来源:站长网
导读:rem ---表单提示函数 Being----------------------------- CODE Copy ... Function Check_submit(str,restr) if str= then response.write script response.wri
rem ---表单提示函数 Being-----------------------------

CODE Copy ...

Function Check_submit(str,restr)
if str="" then
response.write "<script>"
response.write "alert('"&restr&"');"
response.write "history.go(-1)"
response.write "</script>"
response.end
else
Check_submit=str
end if
End Function

CODE Copy ...

Function Alert_submit(str)
response.write "<script>"
response.write "alert('"&str&"');"
'response.write "location.reload();"
response.write "</script>"
End Function

CODE Copy ...

Function localhost_submit(str,urls)
response.write "<script>"
if str<>"" then
response.write "alert('"&str&"');"
end if
response.write "location='"&urls&"';"
response.write "</script>"
End Function

rem ---生成自定义位随机数 Being-----------------------------

CODE Copy ...

Function makerndid(byVal maxLen)
Dim strNewPass
Dim whatsNext, upper, lower, intCounter
RANdomize
For intCounter = 1 To maxLen
whatsNext = int(2 * Rnd)
If whatsNext = 0 Then
upper = 80
lower = 70
Else
upper = 48
lower = 39
End If
strNewPass = strNewPass & Chr(Int((upper - lower + 1) * Rnd + upper))
Next
makerndid = strNewPass
End Function

(编辑:济南站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读