", CHR(10) & CHR(10)) fString = Replace(fString, " ", CHR(10)) htmlencode1=fString else htmlencode1="" end if end function
rem ---页面显示用--- CODE Copy ... function htmlencode2(fString) if fString<>"" and not isnull(fString) then fString = replace(fString, ">", ">") fString = replace(fString, "<", "<") fString = Replace(fString, chr(32), " ") fString = Replace(fString, CHR(10) & CHR(10), " ") fString = Replace(fString, CHR(10), " ") htmlencode2=fString else htmlencode2="" end if end function
rem ---取出指定字符串前后的字符串方法--- CODE Copy ... function GetStrs(str1,CharFlag,Dflag) dim tmpstr if Dflag=0 then'取左 pos1=instr(str1,charFlag) if pos1<=20 then tmpstr=left(str1,pos1-1) else tmpstr=mid(str1,pos1-20,20) end if else '取右 pos1=instr(str1,charFlag)+len(charFlag) if len(str1)-pos1<=20 then tmpstr=right(str1,len(str1)-pos1) else tmpstr=mid(str1,pos1+1,20) end if end if GetStrs=tmpstr end function
rem ---取出文件名--- CODE Copy ... function getfilename(str) pos=instr(str,".") if str<>"" then str=mid(str,pos,len(str)) end if getfilename=str end function
rem ---取到浏览器版本转换字符串--- CODE Copy ... function browser() dim text text = Request.ServerVariables("HTTP_USER_AGENT") if Instr(text,"MSIE 5.5")>0 then browser="IE 5.5" elseif Instr(text,"MSIE 6.0")>0 then browser="IE 6.0" elseif Instr(text,"MSIE 5.01")>0 then browser="IE 5.01" elseif Instr(text,"MSIE 5.0")>0 then browser="IE 5.00" elseif Instr(text,"MSIE 4.0")>0 then browser="IE 4.01" else browser="未知" end if end function
rem ---取到系统脚本转换字符串--- CODE Copy ... function system(text) if Instr(text,"NT 5.1")>0 then system=system+"Windows XP" elseif Instr(text,"NT 5")>0 then system=system+"Windows 2000" elseif Instr(text,"NT 4")>0 then system=system+"Windows NT4" elseif Instr(text,"4.9")>0 then |