【asp实现过滤关键字的函数】教程文章相关的互联网学习教程文章

ASP通用分页样式函数代码

<% '****************************** '函数:MultiPage(Numbers,Perpage,Curpage,Url_Add) '参数:Numbers,总记录数;Perpage,每页记录数;Curpage,当前页;Url_Add,当前页其它参数如?action=list& '作者:阿里西西 '日期:2007/7/15 '描述:ASP通用分页样式函数 '示例:MultiPage(100,10,2,"?action=list&") '****************************** Function MultiPage(Numbers,Perpage,Curpage,Url_Add) CurPage=Int(Curpage) Dim UR...

asp 字符串截取函数

asp 字符串截取函数'********************************************************* '函数:cutStr[str(strlen)] '参数:str,待处理的字符串,strlen,截取的长度 '作者:木木 '日期:2007/7/12 '描述:截取指定长度的字符串 '示例:<%=cutStr("欢迎光临阿里西西",5)%> '********************************************************* function cutStr(str,strlen) If str = "" Then cutStr = "cutStr函数异常:字符串为空" exit fu...

asp 生成任意英文+数字位数长度的随机码函数

<% '****************************** '函数:Generator(Length) '参数:Length,任意长度的数值,随机码位数 '作者:阿里西西 '日期:2007/7/15 '描述:生成任意英文+数字位数长度的随机码函数 '示例:Generator(80) '****************************** Function Generator(Length) Dim i, tempS tempS = "abcdefghijklmnopqrstuvwxyz1234567890" Generator = "" If isNumeric(Length) = False Then Exit Function End If ...

asp下实现格式化文件大小以MB显示的函数

<% '****************************** '函数:FormatFileSize(l1) '参数:l1,字节数 '作者:阿里西西 '日期:2007/7/12 '描述:格式化文件大小样式 '示例:<%=FormatFileSize(l1)%> '****************************** function FormatFileSize(l1) dim l2,l3 l3=formatnumber(l1,0,true) if l1>1048576 then l2="("&formatnumber(l1/1048576,0,true)&" MB) "&l3 else if l1>1024 then l2="("&formatnumber(l1/1024,0,true)...

asp 取得中文句子头一个字的大写拼音字母的函数

取得中文句子头一个字的大写拼音字母<% '****************************** '函数:getpychar(char) '参数:char,任意中文字符或句子 '作者:阿里西西 '日期:2007/7/15 '描述:取得中文句子头一个字的大写拼音字母 '示例:getpychar("欢迎访问阿里西西") '****************************** Function getpychar(char) Dim tmp tmp=65536+Asc(char) If(tmp>=45217 And tmp<=45252) Then getpychar= "A" ElseIF(tmp>=45253 And ...

asp 下用正则表达式检测邮箱格式的函数

'********************************************************* '函数:IsValidEmail[str] '参数:str,待处理的字符串 '作者:木木 '日期:2007/7/12 '描述:检测邮箱格式是否为xxxx@xxx.com或者xxxx@xxx.com.cn等格式 '示例:<%=IsValidEmail(ali@alixixi.com)%> '********************************************************* Function IsValidEmail(str) Dim regEx Set regEx = New RegExp regEx.Pattern = "[\w\-\.]+@[A-Za-z0-...

asp实现计算两个时间内的工作日的函数

<% '****************************** '函数:workdays(date_begin , date_end) '参数:date_begin,开始日期;date_end,结束日期 '作者:阿里西西 '日期:2007/7/15 '描述:计算两个时间内的工作日 '示例:workdays("2007-05-18" , "2007-05-21") '****************************** function workdays(date_begin , date_end) date_begin = CDate(date_begin) date_end = CDate(date_end) if IsDate(date_begin) and IsDate(date_...

asp 实现检测字符串是否为纯字母和数字组合的函数

<% '****************************** '函数:CheckString(strng) '参数:strng,待验证字符串 '作者:阿里西西 '日期:2007/7/13 '描述:检测字符串是否为纯字母和数字组合 '示例:<%=CheckString(strng)%> '****************************** Function CheckString(strng) CheckString = true Dim regEx, Match Set regEx = New RegExp regEx.Pattern = "^[A-Za-z0-9]+$" regEx.IgnoreCase = True Set Match...

asp代码实现检测组件是否安装的函数

<% '****************************** '函数:IsObjInstalled(strClassString) '参数:strClassString,组件对象名 '作者:阿里西西 '日期:2007/7/13 '描述:检测组件是否安装 '示例:<%=IsObjInstalled(strClassString)%> '****************************** Function IsObjInstalled(strClassString) On Error Resume Next IsObjInstalled = False 'Err = 0 Dim xTestObj Set xTestObj = Server.CreateObject(s...

asp实现过滤关键字的函数

过滤关键字<% '****************************** '函数:ChkKeyWord(ByVal keyword) '参数:keyword,关键字 '作者:阿里西西 '日期:2007/7/15 '描述:过滤关键字 '示例:ChkKeyWord("sfsdfdf'8&5ddd") '****************************** Function ChkKeyWord(ByVal keyword) Dim FobWords, i On Error Resume Next FobWords = Array(91, 92, 304, 305, 430, 431, 437, 438, 12460, 12461, 12462, 12463, 12464, 12465, 12466,...

asp实现限制搜索的关键字的函数

<% '****************************** '函数:CheckQuery(ByVal str) '参数:str ----搜索的字符串 '作者:阿里西西 '日期:2007/7/15 '描述:限制搜索的关键字 '示例:CheckQuery(str) '****************************** Public Function CheckQuery(ByVal str) Dim FobWords, i, keyword keyword = str On Error Resume Next FobWords = Array(91, 92, 304, 305, 430, 431, 437, 438, 12460, 12461, 12462, 12463, 12464,...

asp字符串加密解密函数

<% A_Key=split("96,44,63,80",",") '定义密钥 '*********加密的过程********* Function EnCrypt(m) Dim strChar,iKeyChar,iStringChar,I k=0 for I = 1 to Len(m) iKeyChar =Cint(A_Key(k)) iStringChar = Asc(mid(m,I,1)) '获取字符的ASCII码值 iCryptChar = iKeyChar Xor iStringChar '进行异或运算 '对密钥进行移位运算 If k<3 Then k=k+1 Else k=0 End If c = c & Chr(iCryptChar) next EnCrypt = c End F...

推荐ASP中VBScript常用函数

/*-------------------ASP文档参考集-----------------------*/ *-->作者:草履虫 *-->时间:2007-4.28---2007-4.30(原来是自己编写的手册,现在发在这里) *-->联系:caolvchong@gmail.com *-->文档功能: 1.复习了ASP,加深了对ASP结构的理解和ASP的体会 2.可以用来做ASP参考,自己写的,参考起来更方便 这是第五部分:ASP中VBScript常用函数 /*-----------------------ASP中VBScript常用函数---------------------*/ *-->判断类函数: I...

[推荐]ASP编程通用函数收藏大全第1/2页

本帖将收集和征集最全面的ASP编程应用中通用功能函数,人人为我,我为人人:) 只要大家每人献出一两条自己收藏已久,精典的通用函数,我想本帖将会对许许多多的ASP编程爱好者、工作者有很大的帮助,也将成为大家ASP编程的必备函数集。 赶快检查您自己的函数库吧,看一下你有的我们这里都有了吗? 如果你发现了你的函数库里还有着那么一两条鲜为人知的函数,那快点以下面格式跟帖回复吧。 发表通用函数帖子格式: 代码如下:<% ****...

asp Chr 函数 数字转字母的方法

Chr 函数 返回与指定的 ANSI 字符代码相对应的字符。 Chr(charcode) charcode 参数是可以标识字符的数字。 说明 从 0 到 31 的数字表示标准的不可打印的 ASCII 代码。例如,Chr(10) 返回换行符。 下面例子利用 Chr 函数返回与指定的字符代码相对应的字符: Dim MyChar MyChar = Chr(65) '返回 A。 MyChar = Chr(97) '返回 a。 MyChar = Chr(62) '返回 >。 MyChar = Chr(37) '返回 %。注意 ChrB 函数与包含在字符串中的...