Public Function CheckBIG(strSource As String) As BooleanDim idx As LongDim ByteTemp() As ByteCheckBIG = FalseFor idx = 1 To Len(strSource) ByteTemp = StrConv(Mid(strSource, idx, 1), vbFromUnicode) I ...……
%Function Comma(str)If Not(IsNumeric(str)) Or str = 0 Then Result = 0ElseIf Len(Fix(str)) 4 Then Result = strElse Pos = Instr(1,str,".") If Pos 0 Then Dec = Mid(str,Pos) End if Res = StrReverse(Fix( ...……
Public Function XtoF(str As Currency, Optional fenm As Integer = 32) As String ' 只限于整除分数. Dim Cfm As Currency Dim cfmmod As Integer On Error GoTo Erroreof Cfm = 1 / fenm XtoF = "" If str = 0 Th ...……
如何准确地获得一个整数?function NumbersOnlyNoDecimals(pInString) lNumbersOnly = "" for x = 1 to len(pInString) y = (len(pInString)-x+1) if isNumeric(mid(pInString, y,1)) then lNumbersOnly = lNumbers ...……
如何测试字符串的长度?Function CheckStringLength(txt) txt=trim(txt) x = len(txt) y = 0 for ii = 1 to x if asc(mid(txt,ii,1)) 0 or asc(mid(txt,ii,1)) 255 then ' 如果是中文. y = y + 2 el ...……
form name=f1 METHOD="POST"%OpenDB objConn, "xxxx"Set RSClass = objConn.Execute("select * from class Order by fldClass")If RSClass.EOF Then Response.Write "噢,没有记录!BR"ElseResponse.Write "select NAM ...……
Sub DoDropDown(Arr(), strSelName, onchange, strSelected, strexclude)Dim i if strSelected "" then swap arr, strSelected end if response.write "select NAME='" strSelName "' SIZE=1 ONCHANGE ...……
如何实现非大小写的替换?Function ReplaceNoIgnoreCase(str,replStr) If len(replStr)1 or str="" Then ReplaceTest=str Exit function End If Dim LoopN LoopN=1 Dim TmpStr,inStrN,LenreplSt ...……
如何在ADSI中查询用户属性?%Dim x On error resume next'Set x = GetObject("WinNT://kenfilszwin2k/allen")strLDAP="LDAP://kenfilszwin2k/CN=Allen He,OU=kenfilsz,dc=kenfilsz,dc=com"set x=getobject(strLDAP)R ...……