asp

ASP来实现UTF8转换GB2312国标码

ASP来实现UTF8转换GB2312国标码-GB2312转UTF-8'个人代码风格注释(变量名中第一个小写字母表表示变量类型) 'i:为Integer型; 's:为String; Function U2UTF8(Byval a_iNum)     Dim sResult,sUTF8     Dim iTemp,iHexNum,i    iHexNum = Trim(a_iNum)    If iHexNum = "" Then         Exit Function     End If    sResult = ""    If (iHexNum < 128) Then         sResult = sResult & iHexNum     ElseIf...

截取字符串-InterceptString

'************* 截取字符串 **************function InterceptString(txt,length) txt=trim(txt) x = len(txt) y = 0 if x >= 1 then for ii = 1 to x if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then '如果是汉字 y = y + 2 else y = y + 1 end if if y >= length then txt = left(trim(txt),ii) '字符串限长 exit for end if next InterceptString = txt else InterceptString = "" end ifEnd...

测字符串长度-CheckStringLength

'*************测字符串长度**************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 else y = y + 1 end if next CheckStringLength = yEnd...

asp读取QQwry.dat

<%'=========================================================' QQWry.DAT 利用程序 修改自互联网流传代码' 本类在ASP环境中使用纯真版QQWry.dat通过完美测试' 如果您的服务器环境不支持ADodb.Stream,将无法使用此程序' 推荐使用纯真数据库,更新也方便' ========================================================' ============================================' 返回IP信息' ...

纯ASP代码生成图表函数1——柱状图

4 then temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)else temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)end ifelseif temp1>4 then temp3=10 else temp3=5end iftemp4=temp3response.write ""response.write ""response.write ""select case table_typecase "A"table_space=(all_width-table_width*total_no)/total_noresponse.write ""for i=0 to all_height-1 step all_height/5response.write ""response.write ""response.write ""response.write...

asp设置文件下载

<% 'asp读取1.swf这个文件,并提供下载,可以让用户无法获知下载文件的实际地址。 Response.Buffer = True Dim objXMLHTTP, xml Set xml = Server.CreateObject("Microsoft.XMLHTTP") '创建对象xml.Open "GET","http://www.itlearner.com/1.swf",False ' '设置对象,具体xmlhttp详细使用方法请见:《XMLHTTP 对象及其方法》一文xml.Send '发送请求Response.AddHeader "Content-Disposition", "attachment;filename=banner_k_050202.swf"...

FilterJS-过滤JS代码

Function FilterJS(v) if not isnull(v) then dim t dim re dim reContent Set re=new RegExp re.IgnoreCase...

nohtml-去掉html代码

function nohtml(str) dim re Set re=new RegExp re.IgnoreCase =true re.Global=True ...