<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>代码收藏 &#187; asp</title> <atom:link href="http://code.9enjoy.com/category/asp/feed/" rel="self" type="application/rss+xml" /><link>http://code.9enjoy.com</link> <description>收集网站开发时常用到的代码(asp,php,js等)，以函数为主</description> <lastBuildDate>Mon, 24 Jan 2011 14:23:49 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.1</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>ASP来实现UTF8转换GB2312国标码</title><link>http://code.9enjoy.com/asp/gb2utf8/</link> <comments>http://code.9enjoy.com/asp/gb2utf8/#comments</comments> <pubDate>Tue, 06 Apr 2010 14:12:33 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[gb2312]]></category> <category><![CDATA[utf8]]></category> <category><![CDATA[字符串]]></category><guid
isPermaLink="false">http://code.9enjoy.com/?p=170</guid> <description><![CDATA[ASP来实现UTF8转换GB2312国标码-GB2312转UTF-8
&#8216;个人代码风格注释（变量名中第一个小写字母表表示变量类型）
&#8216;i:为Integer型;
&#8217;s:为String;
Function U2UTF8(Byval a_iNum)
    Dim sResult,sUTF8
    Dim iTemp,iHexNum,i
    iHexNum = Trim(a_iNum)
    If iHexNum = &#8220;&#8221; Then
        Exit Function
    End If
    sResult = &#8220;&#8221;
    If (iHexNum &#60; 128) Then
        sResult = sResult &#38; iHexNum
    ElseIf (iHexNum &#60; 2048) Then
        sResult = ChrB(&#38;H80 + (iHexNum And &#38;H3F))
        iHexNum = iHexNum \ &#38;H40
        sResult = ChrB(&#38;HC0 + (iHexNum And [...]]]></description> <content:encoded><![CDATA[<p>ASP来实现UTF8转换GB2312国标码-GB2312转UTF-8</p><p>&#8216;个人代码风格注释（变量名中第一个小写字母表表示变量类型）<br
/> &#8216;i:为Integer型;<br
/> &#8217;s:为String;<br
/> Function U2UTF8(Byval a_iNum)<br
/>     Dim sResult,sUTF8<br
/>     Dim iTemp,iHexNum,i</p><p>    iHexNum = Trim(a_iNum)</p><p>    If iHexNum = &#8220;&#8221; Then<br
/>         Exit Function<br
/>     End If</p><p>    sResult = &#8220;&#8221;</p><p>    If (iHexNum &lt; 128) Then<br
/>         sResult = sResult &amp; iHexNum<br
/>     ElseIf (iHexNum &lt; 2048) Then<br
/>         sResult = ChrB(&amp;H80 + (iHexNum And &amp;H3F))<br
/>         iHexNum = iHexNum \ &amp;H40<br
/>         sResult = ChrB(&amp;HC0 + (iHexNum And &amp;H1F)) &amp; sResult<br
/>     ElseIf (iHexNum &lt; 65536) Then<br
/>         sResult = ChrB(&amp;H80 + (iHexNum And &amp;H3F))<br
/>         iHexNum = iHexNum \ &amp;H40<br
/>         sResult = ChrB(&amp;H80 + (iHexNum And &amp;H3F)) &amp; sResult<br
/>         iHexNum = iHexNum \ &amp;H40<br
/>         sResult = ChrB(&amp;HE0 + (iHexNum And &amp;HF)) &amp; sResult<br
/>     End If</p><p>    U2UTF8 = sResult<br
/> End Function</p><p>Function GB2UTF(Byval a_sStr)<br
/>     Dim sGB,sResult,sTemp<br
/>     Dim iLen,iUnicode,iTemp,i</p><p>    sGB = Trim(a_sStr)<br
/>     iLen = Len(sGB)<br
/>     For i = 1 To iLen<br
/>          sTemp = Mid(sGB,i,1)<br
/>          iTemp = Asc(sTemp)</p><p>         If (iTemp&gt;127 OR iTemp&lt;0) Then<br
/>              iUnicode = AscW(sTemp)<br
/>              If iUnicode&lt;0 Then<br
/>                  iUnicode = iUnicode + 65536<br
/>              End If<br
/>         Else<br
/>             iUnicode = iTemp<br
/>         End If</p><p>        sResult = sResult &amp; U2UTF8(iUnicode)<br
/>     Next</p><p>    GB2UTF = sResult<br
/> End Function</p><p>&#8216;调用方法<br
/> Response.BinaryWrite(GB2UTF(&#8220;中国人&#8221;))<br
/> 该文章出自《TOMMYHU&#8217;s blog》,原文链接：<a
href="http://www.tommyhu.cn/asp-to-achieve-utf8-conversion-gb2312-gb-code/">http://www.tommyhu.cn/asp-to-achieve-utf8-conversion-gb2312-gb-code/</a></p><p>转载时间是: 2010-04-06 07:09:31 请务必保留此链接，谢谢！</p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=170&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/gb2utf8/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>截取字符串-InterceptString</title><link>http://code.9enjoy.com/asp/interceptstring/</link> <comments>http://code.9enjoy.com/asp/interceptstring/#comments</comments> <pubDate>Wed, 05 Nov 2008 09:27:55 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[字符串]]></category> <category><![CDATA[截取]]></category> <category><![CDATA[长度]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=56</guid> <description><![CDATA['************* 截取字符串 ************** <br/><br/>function InterceptString(txt,length) <br/>txt=trim(txt) <br/>x = len(txt) <br/>y = 0 <br/>if x >= 1 then <br/>for ii = 1 to x <br/>if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then '如果是汉字 <br/>y = y + 2 <br/>else <br/>y = y + 1 <br/>end if <br/>if y >= length then <br/>...
]]></description> <content:encoded><![CDATA[<p>&#8216;************* 截取字符串 **************</p><p>function InterceptString(txt,length)<br
/> txt=trim(txt)<br
/> x = len(txt)<br
/> y = 0<br
/> if x &gt;= 1 then<br
/> for ii = 1 to x<br
/> if asc(mid(txt,ii,1)) &lt; 0 or asc(mid(txt,ii,1)) &gt;255 then &#8216;如果是汉字<br
/> y = y + 2<br
/> else<br
/> y = y + 1<br
/> end if<br
/> if y &gt;= length then<br
/> txt = left(trim(txt),ii) &#8216;字符串限长<br
/> exit for<br
/> end if<br
/> next<br
/> InterceptString = txt<br
/> else<br
/> InterceptString = &#8220;&#8221;<br
/> end if</p><p>End Function</p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=56&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/interceptstring/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>测字符串长度-CheckStringLength</title><link>http://code.9enjoy.com/asp/check-string-length/</link> <comments>http://code.9enjoy.com/asp/check-string-length/#comments</comments> <pubDate>Wed, 05 Nov 2008 09:27:14 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[字符串]]></category> <category><![CDATA[长度]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=55</guid> <description><![CDATA['*************测字符串长度************** <br/><br/>Function CheckStringLength(txt) <br/>txt=trim(txt) <br/>x = len(txt) <br/>y = 0 <br/>for ii = 1 to x <br/>if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then '如果是汉字 <br/>y = y + 2 <br/>else <br/>y = y + 1 <br/>end if <br/>next <br/>CheckStringLength = y <br/>...
]]></description> <content:encoded><![CDATA[<p>&#8216;*************测字符串长度**************</p><p>Function CheckStringLength(txt)<br
/> txt=trim(txt)<br
/> x = len(txt)<br
/> y = 0<br
/> for ii = 1 to x<br
/> if asc(mid(txt,ii,1)) &lt; 0 or asc(mid(txt,ii,1)) &gt;255 then &#8216;如果是汉字<br
/> y = y + 2<br
/> else<br
/> y = y + 1<br
/> end if<br
/> next<br
/> CheckStringLength = y</p><p>End Function</p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=55&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/check-string-length/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>asp读取QQwry.dat</title><link>http://code.9enjoy.com/asp/qqwry/</link> <comments>http://code.9enjoy.com/asp/qqwry/#comments</comments> <pubDate>Wed, 16 Jul 2008 15:49:28 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[ip]]></category> <category><![CDATA[QQwry]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=47</guid> <description><![CDATA[<%   <br/> <br/>'========================================================= <br/> <br/>' QQWry.DAT 利用程序 修改自互联网流传代码 <br/> <br/>' 本类在ASP环境中使用纯真版QQWry.dat通过完美测试 <br/> <br/>' 如果您的服务器环境不支持ADodb.Stream，将无法使用此程序 <br/> <br/>' 推荐使用纯真数据库，更新也方便 <br/> <br/>' ======================================================== <br/>...
]]></description> <content:encoded><![CDATA[<p>&lt;%</p><p>&#8216;=========================================================</p><p>&#8216; QQWry.DAT 利用程序 修改自互联网流传代码</p><p>&#8216; 本类在ASP环境中使用纯真版QQWry.dat通过完美测试</p><p>&#8216; 如果您的服务器环境不支持ADodb.Stream，将无法使用此程序</p><p>&#8216; 推荐使用纯真数据库，更新也方便</p><p>&#8216;  ========================================================</p><p>&#8216;  ============================================</p><p>&#8216; 返回IP信息</p><p>&#8216;  ============================================</p><p>Function Look_Ip(IP)</p><p>Dim Wry, IPType, QQWryVersion, IpCounter</p><p>&#8216; 设置类对象</p><p>Set Wry  = New TQQWry</p><p>&#8216; 开始搜索，并返回搜索结果</p><p>&#8216; 您可以根据 QQWry(IP)  返回值来判断该IP地址在数据库中是否存在，如果不存在可以执行其他的一些操作</p><p>&#8216; 比如您自建一个数据库作为追捕等，这里我就不详细说明了</p><p>IPType = Wry.QQWry(IP)</p><p>&#8216;Tibet代码</p><p>if IPType = 0  then</p><p>if instr(Wry.localStr,&#8221;网通&#8221;)&lt;&gt;0 then</p><p>Look_Ip =  &#8220;document.write(&#8220;&#8221;网通&#8221;");&#8221;</p><p>else</p><p>Look_Ip =  &#8220;document.write(&#8220;&#8221;电信&#8221;");&#8221;</p><p>end if</p><p>else</p><p>Look_Ip =  &#8220;document.write(&#8220;&#8221;电信&#8221;");&#8221;</p><p>end if</p><p>Exit Function</p><p>&#8216;Tibet代码</p><p>&#8216; Country：国家地区字段</p><p>&#8216; LocalStr：省市及其他信息字段</p><p>Look_Ip =  Wry.Country &amp; &#8221; &#8221; &amp; Wry.LocalStr</p><p>End Function</p><p>&#8216;  ============================================</p><p>&#8216; 返回IP信息 JS调用</p><p>&#8216;  ============================================</p><p>Function GetIpInfoAv(IP,  sType)</p><p>Dim Wry, IPType</p><p>Set Wry = New TQQWry</p><p>IPType =  Wry.QQWry(IP)</p><p>Select Case sType</p><p>Case 1 GetIpInfoAv =  &#8220;document.write(&#8220;&#8221;" &amp; IP &amp; &#8220;&#8221;");&#8221;</p><p>Case 2 GetIpInfoAv =  &#8220;document.write(&#8220;&#8221;" &amp; Wry.Country &amp; &#8220;&#8221;");&#8221;</p><p>Case 3 GetIpInfoAv =  &#8220;document.write(&#8220;&#8221;" &amp; Wry.LocalStr &amp; &#8220;&#8221;");&#8221;</p><p>Case Else  GetIpInfoAv = &#8220;document.write(&#8220;&#8221;您来自：&#8221; &amp; IP &amp; &#8221; 所在区域：&#8221; &amp; Wry.Country  &amp; &#8221; &#8221; &amp; Wry.LocalStr &amp; &#8220;&#8221;");&#8221;</p><p>End Select</p><p>End  Function</p><p>&#8216; ============================================</p><p>&#8216;  返回QQWry信息(QQWry.Dat版本以及记录条数)</p><p>&#8216;  ============================================</p><p>Function WryInfo()</p><p>Dim Wry, IPType, QQWry(1)</p><p>&#8216; 设置类对象</p><p>Set Wry = New TQQWry</p><p>IPType = Wry.QQWry(&#8220;255.255.255.255&#8243;)</p><p>&#8216; 读取数据库版本信息</p><p>QQWry(0) = Wry.Country &amp; &#8221; &#8221; &amp; Wry.LocalStr</p><p>&#8216;  读取数据库IP地址数目</p><p>QQWry(1) = Wry.RecordCount + 1</p><p>WryInfo = QQWry</p><p>End Function</p><p>&#8216; ============================================</p><p>&#8216; IP物理定位搜索类</p><p>&#8216; ============================================</p><p>Class TQQWry</p><p>&#8216; ============================================</p><p>&#8216; 变量声名</p><p>&#8216; ============================================</p><p>Dim Country, LocalStr, Buf, OffSet</p><p>Private StartIP, EndIP,  CountryFlag</p><p>Public QQWryFile</p><p>Public FirstStartIP, LastStartIP,  RecordCount</p><p>Private Stream, EndIPOff</p><p>&#8216;  ============================================</p><p>&#8216; 类模块初始化</p><p>&#8216;  ============================================</p><p>Private Sub  Class_Initialize</p><p>Country = &#8220;&#8221;</p><p>LocalStr = &#8220;&#8221;</p><p>StartIP = 0</p><p>EndIP = 0</p><p>CountryFlag = 0</p><p>FirstStartIP = 0</p><p>LastStartIP = 0</p><p>EndIPOff = 0</p><p>QQWryFile =  Server.MapPath(&#8220;QQWry.dat&#8221;) &#8216;QQ IP库路径，要转换成物理路径</p><p>End Sub</p><p>&#8216;  ============================================</p><p>&#8216; IP地址转换成整数</p><p>&#8216;  ============================================</p><p>Function IPToInt(IP)</p><p>Dim IPArray, i</p><p>IPArray = Split(IP, &#8220;.&#8221;, -1)</p><p>FOr i = 0 to  3</p><p>If Not IsNumeric(IPArray(i)) Then IPArray(i) = 0</p><p>If  CInt(IPArray(i)) &lt; 0 Then IPArray(i) = Abs(CInt(IPArray(i)))</p><p>If  CInt(IPArray(i)) &gt; 255 Then IPArray(i) = 255</p><p>Next</p><p>IPToInt =  (CInt(IPArray(0))*256*256*256) + (CInt(IPArray(1))*256*256) +  (CInt(IPArray(2))*256) + CInt(IPArray(3))</p><p>End Function</p><p>&#8216;  ============================================</p><p>&#8216; 整数逆转IP地址</p><p>&#8216;  ============================================</p><p>Function IntToIP(IntValue)</p><p>p4 = IntValue &#8211; Fix(IntValue/256)*256</p><p>IntValue =  (IntValue-p4)/256</p><p>p3 = IntValue &#8211; Fix(IntValue/256)*256</p><p>IntValue  = (IntValue-p3)/256</p><p>p2 = IntValue &#8211; Fix(IntValue/256)*256</p><p>IntValue = (IntValue &#8211; p2)/256</p><p>p1 = IntValue</p><p>IntToIP =  Cstr(p1) &amp; &#8220;.&#8221; &amp; Cstr(p2) &amp; &#8220;.&#8221; &amp; Cstr(p3) &amp; &#8220;.&#8221; &amp;  Cstr(p4)</p><p>End Function</p><p>&#8216;  ============================================</p><p>&#8216; 获取开始IP位置</p><p>&#8216;  ============================================</p><p>Private Function  GetStartIP(RecNo)</p><p>OffSet = FirstStartIP + RecNo * 7</p><p>Stream.Position = OffSet</p><p>Buf = Stream.Read(7)</p><p>EndIPOff = AscB(MidB(Buf, 5, 1)) + (AscB(MidB(Buf, 6, 1))*256) +  (AscB(MidB(Buf, 7, 1))*256*256)</p><p>StartIP = AscB(MidB(Buf, 1, 1)) +  (AscB(MidB(Buf, 2, 1))*256) + (AscB(MidB(Buf, 3, 1))*256*256) + (AscB(MidB(Buf,  4, 1))*256*256*256)</p><p>GetStartIP = StartIP</p><p>End Function</p><p>&#8216;  ============================================</p><p>&#8216; 获取结束IP位置</p><p>&#8216;  ============================================</p><p>Private Function GetEndIP()</p><p>Stream.Position = EndIPOff</p><p>Buf = Stream.Read(5)</p><p>EndIP =  AscB(MidB(Buf, 1, 1)) + (AscB(MidB(Buf, 2, 1))*256) + (AscB(MidB(Buf, 3,  1))*256*256) + (AscB(MidB(Buf, 4, 1))*256*256*256)</p><p>CountryFlag =  AscB(MidB(Buf, 5, 1))</p><p>GetEndIP = EndIP</p><p>End Function</p><p>&#8216;  ============================================</p><p>&#8216; 获取地域信息，包含国家和和省市</p><p>&#8216;  ============================================</p><p>Private Sub GetCountry(IP)</p><p>If (CountryFlag = 1 or CountryFlag = 2) Then</p><p>Country =  GetFlagStr(EndIPOff + 4)</p><p>If CountryFlag = 1 Then</p><p>LocalStr =  GetFlagStr(Stream.Position)</p><p>&#8216; 以下用来获取数据库版本信息</p><p>If IP &gt;=  IPToInt(&#8220;255.255.255.0&#8243;) And IP &lt;= IPToInt(&#8220;255.255.255.255&#8243;) Then</p><p>LocalStr = GetFlagStr(EndIPOff + 21)</p><p>Country =  GetFlagStr(EndIPOff + 12)</p><p>End If</p><p>Else</p><p>LocalStr =  GetFlagStr(EndIPOff + 8)</p><p>End If</p><p>Else</p><p>Country =  GetFlagStr(EndIPOff + 4)</p><p>LocalStr = GetFlagStr(Stream.Position)</p><p>End If</p><p>&#8216; 过滤数据库中的无用信息</p><p>Country = Trim(Country)</p><p>LocalStr = Trim(LocalStr)</p><p>If InStr(Country, &#8220;CZ88.NET&#8221;) Then  Country = &#8220;114XP.CN&#8221;</p><p>If InStr(LocalStr, &#8220;CZ88.NET&#8221;) Then LocalStr =  &#8220;114XP.CN&#8221;</p><p>End Sub</p><p>&#8216;  ============================================</p><p>&#8216; 获取IP地址标识符</p><p>&#8216;  ============================================</p><p>Private Function  GetFlagStr(OffSet)</p><p>Dim Flag</p><p>Flag = 0</p><p>Do While (True)</p><p>Stream.Position = OffSet</p><p>Flag = AscB(Stream.Read(1))</p><p>If(Flag = 1 or Flag = 2 ) Then</p><p>Buf = Stream.Read(3)</p><p>If  (Flag = 2 ) Then</p><p>CountryFlag = 2</p><p>EndIPOff = OffSet &#8211; 4</p><p>End If</p><p>OffSet = AscB(MidB(Buf, 1, 1)) + (AscB(MidB(Buf, 2,  1))*256) + (AscB(MidB(Buf, 3, 1))*256*256)</p><p>Else</p><p>Exit Do</p><p>End If</p><p>Loop</p><p>If (OffSet &lt; 12 ) Then</p><p>GetFlagStr = &#8220;&#8221;</p><p>Else</p><p>Stream.Position = OffSet</p><p>GetFlagStr = GetStr()</p><p>End If</p><p>End Function</p><p>&#8216;  ============================================</p><p>&#8216; 获取字串信息</p><p>&#8216;  ============================================</p><p>Private Function GetStr()</p><p>Dim c</p><p>GetStr = &#8220;&#8221;</p><p>Do While (True)</p><p>c =  AscB(Stream.Read(1))</p><p>If (c = 0) Then Exit Do</p><p>&#8216;如果是双字节，就进行高字节在结合低字节合成一个字符</p><p>If c &gt; 127 Then</p><p>If  Stream.EOS Then Exit Do</p><p>GetStrGetStr = GetStr &amp;  Chr(AscW(ChrB(AscB(Stream.Read(1))) &amp; ChrB(C)))</p><p>Else</p><p>GetStrGetStr = GetStr &amp; Chr(c)</p><p>End If</p><p>Loop</p><p>End Function</p><p>&#8216; ============================================</p><p>&#8216; 核心函数，执行IP搜索</p><p>&#8216; ============================================</p><p>Public Function QQWry(DotIP)</p><p>Dim IP, nRet</p><p>Dim RangB,  RangE, RecNo</p><p>IP = IPToInt (DotIP)</p><p>Set Stream =  CreateObject(&#8220;ADodb.Stream&#8221;)</p><p>Stream.Mode = 3</p><p>Stream.Type = 1</p><p>Stream.Open</p><p>Stream.LoadFromFile QQWryFile</p><p>Stream.Position = 0</p><p>Buf = Stream.Read(8)</p><p>FirstStartIP = AscB(MidB(Buf, 1, 1)) + (AscB(MidB(Buf, 2,  1))*256) + (AscB(MidB(Buf, 3, 1))*256*256) + (AscB(MidB(Buf, 4, 1))*256*256*256)</p><p>LastStartIP = AscB(MidB(Buf, 5, 1)) + (AscB(MidB(Buf, 6, 1))*256) +  (AscB(MidB(Buf, 7, 1))*256*256) + (AscB(MidB(Buf, 8, 1))*256*256*256)</p><p>RecordCount = Int((LastStartIP &#8211; FirstStartIP)/7)</p><p>&#8216;  在数据库中找不到任何IP地址</p><p>If (RecordCount &lt;= 1) Then</p><p>Country = &#8220;未知&#8221;</p><p>QQWry = 2</p><p>Exit Function</p><p>End If</p><p>RangB = 0</p><p>RangE = RecordCount</p><p>Do While (RangB &lt; (RangE &#8211; 1))</p><p>RecNo = Int((RangB + RangE)/2)</p><p>Call GetStartIP (RecNo)</p><p>If (IP = StartIP) Then</p><p>RangB = RecNo</p><p>Exit Do</p><p>End  If</p><p>If (IP &gt; StartIP) Then</p><p>RangB = RecNo</p><p>Else</p><p>RangE = RecNo</p><p>End If</p><p>Loop</p><p>Call  GetStartIP(RangB)</p><p>Call GetEndIP()</p><p>If (StartIP &lt;= IP)  And ( EndIP &gt;= IP) Then</p><p>&#8216; 没有找到</p><p>nRet = 0</p><p>Else</p><p>&#8216; 正常</p><p>nRet = 3</p><p>End If</p><p>Call GetCountry(IP)</p><p>QQWry = nRet</p><p>End Function</p><p>&#8216;  ============================================</p><p>&#8216; 类终结</p><p>&#8216;  ============================================</p><p>Private Sub Class_Terminate</p><p>On ErrOr Resume Next</p><p>Stream.Close</p><p>If Err Then Err.Clear</p><p>Set Stream = Nothing</p><p>End Sub</p><p>End Class</p><p>%&gt;</p><p>&lt;% &#8216;——————调用方法 ——————%&gt;<br
/></p><p>&lt;%  &#8216;——————0是显示样式类型——————%&gt;</p><p>&lt;%</p><p>set ip =  request.ServerVariables(&#8220;REMOTE_ADDR&#8221;)</p><p>&#8216;ip = &#8220;&#8230;ip&#8230;&#8221;</p><p>response.Write Look_Ip(ip)</p><p>%&gt;</p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=47&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/qqwry/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>纯ASP代码生成图表函数1——柱状图</title><link>http://code.9enjoy.com/asp/%e7%ba%afasp%e4%bb%a3%e7%a0%81%e7%94%9f%e6%88%90%e5%9b%be%e8%a1%a8%e5%87%bd%e6%95%b01%e2%80%94%e2%80%94%e6%9f%b1%e7%8a%b6%e5%9b%be/</link> <comments>http://code.9enjoy.com/asp/%e7%ba%afasp%e4%bb%a3%e7%a0%81%e7%94%9f%e6%88%90%e5%9b%be%e8%a1%a8%e5%87%bd%e6%95%b01%e2%80%94%e2%80%94%e6%9f%b1%e7%8a%b6%e5%9b%be/#comments</comments> <pubDate>Fri, 06 Jun 2008 17:48:11 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[图表 柱状图]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=41</guid> <description><![CDATA[<%<br/>function table1(total,table_x,table_y,thickness,table_width,all_width,all_height,table_type)<br/>'参数含义(传递的数组，横坐标，纵坐标，柱子的厚度，柱子的宽度，图表的宽度，图表的高度,图表的类型)<br/>'纯ASP代码生成图表函数1——柱状图<br/>'作者：龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com<br/>'本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨<br/>...
]]></description> <content:encoded><![CDATA[<p><%<br/>function table1(total,table_x,table_y,thickness,table_width,all_width,all_height,table_type)<br/>&#8216;参数含义(传递的数组，横坐标，纵坐标，柱子的厚度，柱子的宽度，图表的宽度，图表的高度,图表的类型)<br/>&#8216;纯ASP代码生成图表函数1——柱状图<br/>&#8216;作者：龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com<br/>&#8216;本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨<br/>&#8216;版本2.0 最后修改日期 2003-7-22<br/>&#8216;非常感谢您使用这个函数，请您使用和转载时保留版权信息，这是对作者工作的最好的尊重。<br/>dim tb_color(7,2)<br/>tb_color(1,1)=&#8221;#d1ffd1&#8243;<br/>tb_color(2,1)=&#8221;#ffbbbb&#8221;<br/>tb_color(3,1)=&#8221;#ffe3bb&#8221;<br/>tb_color(4,1)=&#8221;#cff4f3&#8243;<br/>tb_color(5,1)=&#8221;#d9d9e5&#8243;<br/>tb_color(6,1)=&#8221;#ffc7ab&#8221;<br/>tb_color(7,1)=&#8221;#ecffb7&#8243;<br/><br/>tb_color(1,2)=&#8221;#00ff00&#8243;<br/>tb_color(2,2)=&#8221;#ff0000&#8243;<br/>tb_color(3,2)=&#8221;#ff9900&#8243;<br/>tb_color(4,2)=&#8221;#33cccc&#8221;<br/>tb_color(5,2)=&#8221;#666699&#8243;<br/>tb_color(6,2)=&#8221;#993300&#8243;<br/>tb_color(7,2)=&#8221;#99cc00&#8243;<br/><br/>line_color=&#8221;#69f&#8221;<br/>left_width=70<br/>length=thickness/2<br/>total_no=ubound(total,1)<br/><br/>temp1=0<br/>for i=1 to total_no<br/>if temp1<total(i,1) then temp1=total(i,1)<br/>next<br/>temp1=int(temp1)<br/>if temp1>9 then<br/>temp2=mid(cstr(temp1),2,1)<br/>if temp2>4 then <br/> temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)<br/>else<br/> temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)<br/>end if<br/>else<br/>if temp1>4 then temp3=10 else temp3=5<br/>end if<br/>temp4=temp3<br/>response.write &#8220;<!--[if gte vml 1]><v:rect id='_x0000_s1027' alt='' style='position:absolute;left:"&#038;table_x+left_width&"px;top:"&#038;table_y&"px;width:"&#038;all_width&"px;height:"&#038;all_height&"px;z-index:-1' fillcolor='#9cf' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height&#038;"px' to='"&#038;table_x+all_width+left_width&#038;"px,"&#038;table_y+all_height&#038;"px'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y&#038;"px' to='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height&#038;"px'/><![endif]-->&#8220;<br/><br/>select case table_type<br/>case &#8220;A&#8221;<br/>table_space=(all_width-table_width*total_no)/total_no<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y&#038;"px' to='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-length&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>for i=0 to all_height-1 step all_height/5<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' to='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-i&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' to='"&#038;table_x+all_width+left_width&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+(left_width-15)&#038;"px,"&#038;table_y+i&#038;"px' to='"&#038;table_x+left_width&#038;"px,"&#038;table_y+i&#038;"px'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x&"px;top:"&#038;table_y+i&"px;width:"&#038;left_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='right'>&#8220;&#038;temp4&#038;&#8221;</td></tr></table><p></v:textbox></v:shape><![endif]-->&#8220;<br/>temp4=temp4-temp3/5<br/>next<br/>for i=1 to total_no<br/>temp_space=table_x+left_width+table_space/2+table_space*(i-1)+table_width*(i-1)<br/>response.write &#8220;<v:rect id='_x0000_s1025' alt='' style='position:absolute;left:"<br/>response.write temp_space<br/>response.write &#8220;px;top:&#8221;<br/>response.write table_y+all_height*(1-(total(i,1)/temp3))<br/>response.write &#8220;px;width:&#8221;&#038;table_width&#038;&#8221;px;height:&#8221;&#038;all_height*(total(i,1)/temp3)&#038;&#8221;px;z-index:1&#8242; fillcolor=&#8217;&#8221;&#038;tb_color(i,2)&#038;&#8221;&#8216;>&#8221;<br/>response.write &#8220;<v:fill color2='"&#038;tb_color(i,1)&#038;"' rotate='t' type='gradient'/>&#8220;<br/>response.write &#8220;<o:extrusion v:ext='view' backdepth='"&#038;thickness&#038;"pt' color='"&#038;tb_color(i,2)&#038;"' on='t'/>&#8220;<br/>response.write &#8220;</v:rect>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;temp_space&"px;top:"&#038;table_y+all_height*(1-(total(i,1)/temp3))-table_width&"px;width:"&#038;table_space+15&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='center'>&#8220;&#038;total(i,1)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/><br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;temp_space-table_space/2&"px;top:"&#038;table_y+all_height+1&"px;width:"&#038;table_space+table_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='center'>&#8220;&#038;total(i,2)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>next<br/>Case &#8220;B&#8221;<br/>table_space=(all_height-table_width*total_no)/total_no<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-length&#038;"px' to='"&#038;table_x+left_width+all_width&#038;"px,"&#038;table_y+all_height-length&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>for i=0 to all_width-1 step all_width/5<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+i&#038;"px,"&#038;table_y+all_height-length&#038;"px' to='"&#038;table_x+left_width+length+i&#038;"px,"&#038;table_y+all_height&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length+i&#038;"px,"&#038;table_y+all_height-length&#038;"px' to='"&#038;table_x+left_width+length+i&#038;"px,"&#038;table_y&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+i+all_width/5&#038;"px,"&#038;table_y+all_height&#038;"px' to='"&#038;table_x+left_width+i+all_width/5&#038;"px,"&#038;table_y+all_height+15&#038;"px'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+left_width+i+all_width/5-left_width&"px;top:"&#038;table_y+all_height&"px;width:"&#038;left_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='right'>&#8220;&#038;temp4&#038;&#8221;</td></tr></table><p></v:textbox></v:shape><![endif]-->&#8220;<br/>temp4=temp4-temp3/5<br/>next<br/><br/>for i=1 to total_no<br/>temp_space=table_space/2+table_space*(i-1)+table_width*(i-1)<br/>response.write &#8220;<v:rect id='_x0000_s1025' alt='' style='position:absolute;left:"<br/>response.write table_x+left_width<br/>response.write &#8220;px;top:&#8221;<br/>response.write table_y+temp_space<br/>response.write &#8220;px;width:&#8221;&#038;all_width*(total(i,1)/temp3)&#038;&#8221;px;height:&#8221;&#038;table_width&#038;&#8221;px;z-index:1&#8242; fillcolor=&#8217;&#8221;&#038;tb_color(i,2)&#038;&#8221;&#8216;>&#8221;<br/><br
/> response.write &#8220;<v:fill color2='"&#038;tb_color(i,1)&#038;"' rotate='t' angle='-90' focus='100%' type='gradient'/>&#8220;<br/>response.write &#8220;<o:extrusion v:ext='view' backdepth='"&#038;thickness&#038;"pt' color='"&#038;tb_color(i,2)&#038;"' on='t'/>&#8220;<br/>response.write &#8220;</v:rect>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+left_width+all_width*(total(i,1)/temp3)+thickness/2&"px;top:"&#038;table_y+temp_space&"px;width:"&#038;table_space+15&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='center'>&#8220;&#038;total(i,1)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/><br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x&"px;top:"&#038;table_y+temp_space&"px;width:"&#038;left_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='right'>&#8220;&#038;total(i,2)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>next<br/>case else<br/>end select<br/><br/>end function<br/>%><br/><br/> <br/><br/><%<br/>function table2(total,table_x,table_y,all_width,all_height,line_no)<br/>&#8216;参数含义(传递的数组，横坐标，纵坐标，图表的宽度，图表的高度,折线条数)<br/>&#8216;纯ASP代码生成图表函数2——折线图<br/>&#8216;作者：龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com<br/>&#8216;本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨<br/>&#8216;版本1.0 最后修改日期 2003-8-11<br/>&#8216;非常感谢您使用这个函数，请您使用和转载时保留版权信息，这是对作者工作的最好的尊重。<br/><br/>line_color=&#8221;#69f&#8221;<br/>left_width=70<br/>total_no=ubound(total,1)<br/><br/>temp1=0<br/>for i=1 to total_no<br/>for j=1 to line_no<br/> if temp1<total(i,j) then temp1=total(i,j)<br/>next<br/>next<br/>temp1=int(temp1)<br/>if temp1>9 then<br/>temp2=mid(cstr(temp1),2,1)<br/>if temp2>4 then <br/> temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)<br/>else<br/> temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)<br/>end if<br/>else<br/>if temp1>4 then temp3=10 else temp3=5<br/>end if<br/>temp4=temp3<br/>response.write &#8220;<v:rect id='_x0000_s1027' alt='' style='position:absolute;left:"&#038;table_x+left_width&"px;top:"&#038;table_y&"px;width:"&#038;all_width&"px;height:"&#038;all_height&"px;z-index:-1' fillcolor='#9cf' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect>&#8220;<br/>for i=0 to all_height-1 step all_height/5<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' to='"&#038;table_x+all_width+left_width&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' strokecolor='"&#038;line_color&#038;"'/>&#8220;<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+(left_width-15)&#038;"px,"&#038;table_y+i&#038;"px' to='"&#038;table_x+left_width&#038;"px,"&#038;table_y+i&#038;"px'/>&#8220;<br/>response.write &#8220;&#8221;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x&"px;top:"&#038;table_y+i&"px;width:"&#038;left_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='right'>&#8220;&#038;temp4&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>temp4=temp4-temp3/5<br/>next<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height&#038;"px' to='"&#038;table_x+all_width+left_width&#038;"px,"&#038;table_y+all_height&#038;"px'/>&#8220;<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y&#038;"px' to='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height&#038;"px'/>&#8220;<br/><br/>dim line_code<br/>redim line_code(line_no,5)<br/>for i=1 to line_no<br/>line_temp=split(total(0,i),&#8221;,&#8221;)<br/>line_code(i,1)=line_temp(0)<br/>line_code(i,2)=line_temp(1)<br/>line_code(i,3)=line_temp(2)<br/>line_code(i,4)=line_temp(3)<br/>line_code(i,5)=line_temp(4)<br/>next<br/>for j=1 to line_no<br/>for i=1 to total_no-1<br/> x1=table_x+left_width+all_width*(i-1)/total_no<br/> y1=table_y+(temp3-total(i,j))*(all_height/temp3)<br/> x2=table_x+left_width+all_width*i/total_no<br/> y2=table_y+(temp3-total(i+1,j))*(all_height/temp3)<br/> response.write &#8220;<v:line id=""_x0000_s1025"" alt="""" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="""&#038;x1&#038;"px,"&#038;y1&#038;"px"" to="""&#038;x2&#038;"px,"&#038;y2&#038;"px"" coordsize=""21600,21600"" strokecolor="""&#038;line_code(j,1)&#038;""" strokeweight="""&#038;line_code(j,2)&#038;""">&#8220;<br/> select case line_code(j,3)<br/> case 1<br/> case 2<br/> response.write &#8220;<v:stroke dashstyle='1 1'/>&#8220;<br/> case 3<br/> response.write &#8220;<v:stroke dashstyle='dash'/>&#8220;<br/> case 4<br/> response.write &#8220;<v:stroke dashstyle='dashDot'/>&#8220;<br/> case 5<br/> response.write &#8220;<v:stroke dashstyle='longDash'/>&#8220;<br/> case 6<br/> response.write &#8220;<v:stroke dashstyle='longDashDot'/>&#8220;<br/> case 7<br/> response.write &#8220;<v:stroke dashstyle='longDashDotDot'/>&#8220;<br/> case else<br/> end select<br/> response.write &#8220;</v:line>&#8220;&#038;CHR(13)<br/> select case line_code(j,4)<br/> case 1<br/> case 2<br/> response.write &#8220;<v:rect id=""_x0000_s1027"" style='position:absolute;left:"&#038;x1-2&"px;top:"&#038;y1-2&"px;width:4px;height:4px; z-index:2' fillcolor="""&#038;line_code(j,1)&#038;""" strokecolor="""&#038;line_code(j,1)&#038;"""/>&#8220;&#038;CHR(13)<br/> case 3<br/> response.write &#8220;<v:oval id=""_x0000_s1026"" style='position:absolute;left:"&#038;x1-2&"px;top:"&#038;y1-2&"px;width:4px;height:4px;z-index:1' fillcolor="""&#038;line_code(j,1)&#038;""" strokecolor="""&#038;line_code(j,1)&#038;"""/>&#8220;&#038;CHR(13)<br/> end select<br/>next<br/> select case line_code(j,4)<br/> case 1<br/> case 2<br/> response.write &#8220;<v:rect id=""_x0000_s1027"" style='position:absolute;left:"&#038;x2-2&"px;top:"&#038;y2-2&"px;width:4px;height:4px; z-index:2' fillcolor="""&#038;line_code(j,1)&#038;""" strokecolor="""&#038;line_code(j,1)&#038;"""/>&#8220;&#038;CHR(13)<br/> case 3<br/> response.write &#8220;<v:oval id=""_x0000_s1026"" style='position:absolute;left:"&#038;x2-2&"px;top:"&#038;y2-2&"px;width:4px;height:4px;z-index:1' fillcolor="""&#038;line_code(j,1)&#038;""" strokecolor="""&#038;line_code(j,1)&#038;"""/>&#8220;&#038;CHR(13)<br/> end select<br/>next<br/><br/>for i=1 to total_no<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+all_width*(i-1)/total_no&#038;"px,"&#038;table_y+all_height&#038;"px' to='"&#038;table_x+left_width+all_width*(i-1)/total_no&#038;"px,"&#038;table_y+all_height+15&#038;"px'/>&#8220;<br/>response.write &#8220;&#8221;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+left_width+all_width*(i-1)/total_no&"px;top:"&#038;table_y+all_height&"px;width:"&#038;all_width/total_no&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;total(i,0)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>next<br/><br/>tb_height=30<br/>response.write &#8220;<v:rect id='_x0000_s1025' style='position:absolute;left:"&#038;table_x+all_width+20&"px;top:"&#038;table_y&"px;width:100px;height:"&#038;line_no*tb_height+20&"px;z-index:1'/>&#8220;<br/>for i=1 to line_no<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+all_width+25&"px;top:"&#038;table_y+10+(i-1)*tb_height&"px;width:60px;height:"&#038;tb_height&"px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;line_code(i,5)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>response.write &#8220;<v:rect id='_x0000_s1040' alt='' style='position:absolute;left:"&#038;table_x+all_width+80&"px;top:"&#038;table_y+10+(i-1)*tb_height+4&"px;width:30px;height:20px;z-index:1' fillcolor='"&#038;line_code<br
/> (i,1)&#038;"'><v:fill color2='"&#038;line_code(i,1)&#038;"' rotate='t' focus='100%' type='gradient'/></v:rect>&#8220;<br/>next<br/><br/>end function<br/>%><br/><br/> <br/><br/><br/><%<br/>function table3(total,table_x,table_y,all_width,all_height,table_type)<br/>&#8216;参数含义(传递的数组，横坐标，纵坐标，图表的宽度，图表的高度,图表的类型)<br/>&#8216;纯ASP代码生成图表函数3——饼图<br/>&#8216;作者：龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com<br/>&#8216;本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨<br/>&#8216;版本1.0 最后修改日期 2003-8-11<br/>&#8216;非常感谢您使用这个函数，请您使用和转载时保留版权信息，这是对作者工作的最好的尊重。<br/>tb_height=30<br/><br/>dim tb_color(7,2)<br/>tb_color(1,1)=&#8221;#d1ffd1&#8243;<br/>tb_color(2,1)=&#8221;#ffbbbb&#8221;<br/>tb_color(3,1)=&#8221;#ffe3bb&#8221;<br/>tb_color(4,1)=&#8221;#cff4f3&#8243;<br/>tb_color(5,1)=&#8221;#d9d9e5&#8243;<br/>tb_color(6,1)=&#8221;#ffc7ab&#8221;<br/>tb_color(7,1)=&#8221;#ecffb7&#8243;<br/><br/>tb_color(1,2)=&#8221;#00ff00&#8243;<br/>tb_color(2,2)=&#8221;#ff0000&#8243;<br/>tb_color(3,2)=&#8221;#ff9900&#8243;<br/>tb_color(4,2)=&#8221;#33cccc&#8221;<br/>tb_color(5,2)=&#8221;#666699&#8243;<br/>tb_color(6,2)=&#8221;#993300&#8243;<br/>tb_color(7,2)=&#8221;#99cc00&#8243;<br/><br/>total_no=ubound(total,1)<br/>totalpie=0<br/>for i=1 to total_no<br/>totalpie=totalpie+total(i,1)<br/>next<br/><br/>PreAngle=0<br/>for i=1 to total_no<br/>response.write &#8220;<v:shape id='_x0000_s1025' alt='' style='position:absolute;left:"&#038;table_x&"px;top:"&#038;table_y&"px;width:"&#038;all_width&"px;height:"&#038;all_height&"px;z-index:1' coordsize='1500,1400' o:spt='100' adj='0,,0' path='m750,700ae750,700,750,700,"&#038;int(23592960*PreAngle)&#038;","&#038;int(23592960*total(i,1)/totalpie)&#038;"xe' fillcolor='"&#038;tb_color(i,1)&#038;"' strokecolor='#FFFFFF'><v:fill color2='"&#038;tb_color(i,2)&#038;"' rotate='t' focus='100%' type='gradient'/><v:stroke joinstyle='round'/><v:formulas/><v:path o:connecttype='segments'/></v:shape>&#8220;&#038;CHr(13)<br/>PreAngle=PreAngle+total(i,1)/totalpie<br/>next<br/><br/>if table_type=&#8221;A&#8221; then<br/>response.write &#8220;<v:rect id='_x0000_s1025' style='position:absolute;left:"&#038;table_x+all_width+20&"px;top:"&#038;table_y+20&"px;width:100px;height:"&#038;total_no*tb_height+20&"px;z-index:1'/>&#8220;<br/>for i=1 to total_no<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+all_width+25&"px;top:"&#038;table_y+30+(i-1)*tb_height&"px;width:60px;height:"&#038;tb_height&"px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;total(i,0)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>response.write &#8220;<v:rect id='_x0000_s1040' alt='' style='position:absolute;left:"&#038;table_x+all_width+80&"px;top:"&#038;table_y+30+(i-1)*tb_height+3&"px;width:30px;height:20px;z-index:1' fillcolor='"&#038;tb_color(i,1)&#038;"'><v:fill color2='"&#038;tb_color(i,2)&#038;"' rotate='t' focus='100%' type='gradient'/></v:rect>&#8220;<br/>&#8216;显示比例数<br/>&#8216; response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+all_width+110&"px;top:"&#038;table_y+30+(i-1)*tb_height&"px;width:60px;height:"&#038;tb_height&"px;z-index:1'>&#8220;<br/>&#8216; response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;formatnumber(total(i,1)*100/totalpie,2,-1)&#038;&#8221;%</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>next<br/>end if<br/><br/>if table_type=&#8221;B&#8221; then<br/>pie=3.14159265358979<br/>TempPie=0<br/>for i=1 to total_no<br/>TempAngle=pie*2*(total(i,1)/(TotalPie*2)+TempPie)<br/>x1=table_x+all_width/2+cos(TempAngle)*all_width*3/8<br/>y1=table_y+all_height/2-sin(TempAngle)*all_height*3/8<br/>x2=table_x+all_width/2+cos(TempAngle)*all_width*3/4<br/>y2=table_y+all_height/2-sin(TempAngle)*all_height*3/4<br/>if x2>table_x+all_width/2 then<br/> x3=x2+20<br/> x4=x3<br/>else<br/> x3=x2-20<br/> x4=x3-100<br/>end if<br/>response.write &#8220;<v:oval id='_x0000_s1027' style='position:absolute;left:"&#038;x1-2&"px;top:"&#038;y1-2&"px;width:4px;height:4px; z-index:2' fillcolor='#111111' strokecolor='#111111'/>&#8220;&#038;CHR(13)<br/>response.write &#8220;<v:line id='_x0000_s1025' alt='' style='position:absolute;left:0;text-align:left;top:0;z-index:1' from='"&#038;x1&#038;"px,"&#038;y1&#038;"px' to='"&#038;x2&#038;"px,"&#038;y2&#038;"px' coordsize='21600,21600' strokecolor='#111111' strokeweight='1px'></v:line>&#8220;<br/>response.write &#8220;<v:line id='_x0000_s1025' alt='' style='position:absolute;left:0;text-align:left;top:0;z-index:1' from='"&#038;x2&#038;"px,"&#038;y2&#038;"px' to='"&#038;x3&#038;"px,"&#038;y2&#038;"px' coordsize='21600,21600' strokecolor='#111111' strokeweight='1px'></v:line>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;x4&"px;top:"&#038;y2-10&"px;width:100px;height:20px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;total(i,0)&#038;&#8221; &#8220;&#038;formatnumber(total(i,1)*100/totalpie,2,-1)&#038;&#8221;%</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>TempPie=TempPie+total(i,1)/TotalPie<br/>next<br/>end if<br/><br/>end function<br/>%><br/><br/> <br/><br/>纯ASP代码生成图表函数1——柱状图调用示例<br/><%<br/>dim total(7,2)<br/>total(1,1)=200<br/>total(2,1)=800<br/>total(3,1)=1000<br/>total(4,1)=600<br/>total(5,1)=1222<br/>total(6,1)=3213<br/>total(7,1)=8<br/><br/>total(1,2)=&#8221;中国经营报&#8221;<br/>total(2,2)=&#8221;招聘网&#8221;<br/>total(3,2)=&#8221;51Job&#8221;<br/>total(4,2)=&#8221;新民晚报&#8221;<br/>total(5,2)=&#8221;新闻晚报&#8221;<br/>total(6,2)=&#8221;南方周末&#8221;<br/>total(7,2)=&#8221;羊城晚报&#8221;<br/><br/>total_no=7<br/>%><br/><html
xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><br/><!--[if !mso]><br/><br
/><style>/*<![CDATA[*/<br/>v\:*         { behavior: url(#default#VML) }<br/>o\:*         { behavior: url(#default#VML) }<br/>.shape       { behavior: url(#default#VML) }<br/>/*]]>*/</style><p><br/><![endif]--><br/><head><br/><meta
http-equiv="Content-Type" content="text/html; charset=gb2312"><br/><title></title><br/><br
/><style>/*<![CDATA[*/<br/>TD { FONT-SIZE: 9pt}<br/>/*]]>*/</style><p></head><br/><body
topmargin=5 leftmargin=0 scroll=AUTO><br/><%'call table1(total,200,20,20,30,400,200,"A")%><br/><%'call table1(total,200,320,20,20,400,250,"B")%><br/><%call table2(total,200,200,100,100,0)%><br/><br/><%'call table3(total,200,200,200,200,"A")%><br/><br/></p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=41&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/%e7%ba%afasp%e4%bb%a3%e7%a0%81%e7%94%9f%e6%88%90%e5%9b%be%e8%a1%a8%e5%87%bd%e6%95%b01%e2%80%94%e2%80%94%e6%9f%b1%e7%8a%b6%e5%9b%be/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>asp设置文件下载</title><link>http://code.9enjoy.com/asp/hide-down-url/</link> <comments>http://code.9enjoy.com/asp/hide-down-url/#comments</comments> <pubDate>Fri, 06 Jun 2008 17:43:15 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[xmlhttp]]></category> <category><![CDATA[下载]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=40</guid> <description><![CDATA[用asp读取1.swf这个文件，并提供下载，可以让用户无法获知下载文件的实际地址。
]]></description> <content:encoded><![CDATA[<p>&lt;%<br
/> &#8216;asp读取1.swf这个文件，并提供下载，可以让用户无法获知下载文件的实际地址。<br
/> Response.Buffer = True<br
/> Dim objXMLHTTP, xml<br
/> Set xml = Server.CreateObject(&#8220;Microsoft.XMLHTTP&#8221;) &#8216;创建对象</p><p>xml.Open &#8220;GET&#8221;,&#8221;http://www.itlearner.com/1.swf&#8221;,False &#8216;<br
/> &#8216;设置对象,具体xmlhttp详细使用方法请见:<a
href="http://www.itlearner.com/article/2004/901.shtml" target="_blank">《XMLHTTP 对象及其方法》一文</a></p><p>xml.Send &#8216;发送请求</p><p>Response.AddHeader &#8220;Content-Disposition&#8221;, &#8220;attachment;filename=banner_k_050202.swf&#8221; &#8216;添加头给这个文件</p><p>Response.ContentType = &#8220;application/zip&#8221; &#8216;设置输出类型</p><p>Response.BinaryWrite xml.responseBody &#8216;输出二进制到浏览器</p><p>Set xml = Nothing<br
/> %&gt;</p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=40&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/hide-down-url/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>asp下的proxy.asp</title><link>http://code.9enjoy.com/asp/asp%e4%b8%8b%e7%9a%84proxy-asp/</link> <comments>http://code.9enjoy.com/asp/asp%e4%b8%8b%e7%9a%84proxy-asp/#comments</comments> <pubDate>Mon, 26 May 2008 14:07:48 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[proxy]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=36</guid> <description><![CDATA[<%@ Language=JScript EnableSessionState=False%><br/><%<br/><br/>//we are using MSXML3.0 to travel via HTTP<br/><br/>var httpReq;<br/>if(Request.QueryString.Count)<br/>{<br/> httpReq=Server.CreateObject("Msxml2.ServerXMLHTTP");<br/> httpReq.setTimeouts(5000,5000,15000,15000);<br/> httpReq.open("GET",""+Request.QueryString, false);<br/>...
]]></description> <content:encoded><![CDATA[<p><%@ Language=JScript EnableSessionState=False%><br/><%<br/><br/>//we are using MSXML3.0 to travel via HTTP<br/><br/>var httpReq;<br/>if(Request.QueryString.Count)<br/>{<br/> httpReq=Server.CreateObject(&#8220;Msxml2.ServerXMLHTTP&#8221;);<br/> httpReq.setTimeouts(5000,5000,15000,15000);<br/> httpReq.open(&#8220;GET&#8221;,&#8221;"+Request.QueryString, false);<br/> httpReq.send();<br/> Response.Status=httpReq.status;<br/> Response.ContentType=httpReq.getResponseHeader(&#8220;Content-Type&#8221;);<br/> Response.BinaryWrite(httpReq.responseBody);<br/>}<br/>%><br/></p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=36&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/asp%e4%b8%8b%e7%9a%84proxy-asp/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>dvHTMLEncode-文本字段存入、显示用代码</title><link>http://code.9enjoy.com/asp/dvhtmlencode/</link> <comments>http://code.9enjoy.com/asp/dvhtmlencode/#comments</comments> <pubDate>Thu, 20 Mar 2008 21:25:37 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[encode]]></category> <category><![CDATA[html]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=14</guid> <description><![CDATA[dvHTMLEncode-文本字段存入、显示用代码function dvHTMLEncode(fString)<br/>if not isnull(fString) then<br/> fString = replace(fString, ">", "&#62;")<br/> fString = replace(fString, "<", "&#60;")<br/> fString = Replace(fString, CHR(32), "&#160;")<br/> fString = Replace(fString, CHR(9), "&#160;")<br/> fString = Replace(fString, CHR(34), "&#34;")<br/>...
]]></description> <content:encoded><![CDATA[<p
class="code"><code>function dvHTMLEncode(fString)<br
/> if not isnull(fString) then<br
/> fString = replace(fString, "&gt;", "&gt;")<br
/> fString = replace(fString, "&lt;", "&lt;")<br
/> fString = Replace(fString, CHR(32), " ")<br
/> fString = Replace(fString, CHR(9), " ")<br
/> fString = Replace(fString, CHR(34), """)<br
/> fString = Replace(fString, CHR(39), "'")<br
/> fString = Replace(fString, CHR(13), "")<br
/> fString = Replace(fString, CHR(10) &amp; CHR(10), "&lt;/P&gt;&lt;P&gt; ")<br
/> fString = Replace(fString, CHR(10), "&lt;BR&gt; ")</code></p><p><code>dvHTMLEncode = fString<br
/> end if<br
/> end function</p><p>function dvHTMLCode(fString)<br
/> if not isnull(fString) then<br
/> fString = replace(fString, "&gt;", "&gt;")<br
/> fString = replace(fString, "&lt;", "&lt;")</p><p>fString = Replace(fString,  " "," ")<br
/> fString = Replace(fString, """, CHR(34))<br
/> fString = Replace(fString, "'", CHR(39))<br
/> fString = Replace(fString, "&lt;/P&gt;&lt;P&gt; ",CHR(10) &amp; CHR(10))<br
/> fString = Replace(fString, "&lt;BR&gt; ", CHR(10))</p><p></code></p><p><code>dvHTMLCode = fString<br
/> end if<br
/> end function</code></p><p>以下为itlearner注解，本函数的使用方法为：</p><p>如获取表单值时，使用</p><p
class="code"><code>&lt;%<br
/> Title = Request.Form("Title")<br
/> Title = dvhtmlencode(Title)<br
/> %&gt;</code></p><p>在修改内容时，使用</p><p
class="code"><code>&lt;input type="text" name="Title" size="66" id="Title" value="&lt;%=dvHTMLCode(rs("Title"))%&gt;"&gt;</code></p><p>这样，如果Title这个字段中存在双引号，单引号，尖括号之类的代码时，可以正常存储和显示。</p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=14&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/dvhtmlencode/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>FilterJS-过滤JS代码</title><link>http://code.9enjoy.com/asp/filter-js/</link> <comments>http://code.9enjoy.com/asp/filter-js/#comments</comments> <pubDate>Thu, 20 Mar 2008 21:15:22 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[html]]></category> <category><![CDATA[js]]></category> <category><![CDATA[过滤]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=13</guid> <description><![CDATA[Function FilterJS(v)<br/>if not isnull(v) then<br/>dim t<br/>dim re<br/>dim reContent<br/>Set re=new RegExp<br/>re.IgnoreCase =true<br/>re.Global=True<br/>re.Pattern="(javascript)"<br/>t=re.Replace(v,"&#106avascript")<br/>re.Pattern="(jscript:)"<br/>t=re.Replace(t,"&#106script:")<br/>re.Pattern="(js:)"<br/>...
]]></description> <content:encoded><![CDATA[<p>Function FilterJS(v)<br
/> if not isnull(v) then<br
/> dim t<br
/> dim re<br
/> dim reContent<br
/> Set re=new RegExp<br
/> re.IgnoreCase =true<br
/> re.Global=True<br
/> re.Pattern=&#8221;(javascript)&#8221;<br
/> t=re.Replace(v,&#8221;javascript&#8221;)<br
/> re.Pattern=&#8221;(jscript:)&#8221;<br
/> t=re.Replace(t,&#8221;jscript:&#8221;)<br
/> re.Pattern=&#8221;(js:)&#8221;<br
/> t=re.Replace(t,&#8221;js:&#8221;)<br
/> &#8216;re.Pattern=&#8221;(value)&#8221;<br
/> &#8216;t=re.Replace(t,&#8221;value&#8221;)<br
/> re.Pattern=&#8221;(about:)&#8221;<br
/> t=re.Replace(t,&#8221;about:&#8221;)<br
/> re.Pattern=&#8221;(file:)&#8221;<br
/> t=re.Replace(t,&#8221;file:&#8221;)<br
/> re.Pattern=&#8221;(document.cookie)&#8221;<br
/> t=re.Replace(t,&#8221;documents.cookie&#8221;)<br
/> re.Pattern=&#8221;(vbscript:)&#8221;<br
/> t=re.Replace(t,&#8221;vbscript:&#8221;)<br
/> re.Pattern=&#8221;(vbs:)&#8221;<br
/> t=re.Replace(t,&#8221;vbs:&#8221;)<br
/> re.Pattern=&#8221;(on(mouse|exit|error|click|key))&#8221;<br
/> t=re.Replace(t,&#8221;on$2&#8243;)<br
/> &#8216;re.Pattern=&#8221;(&amp;#)&#8221;<br
/> &#8216;t=re.Replace(t,&#8221;＆#&#8221;)<br
/> FilterJS=t<br
/> set re=nothing<br
/> end if<br
/> End Function</p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=13&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/filter-js/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>nohtml-去掉html代码</title><link>http://code.9enjoy.com/asp/nohtml-%e5%8e%bb%e6%8e%89html%e4%bb%a3%e7%a0%81/</link> <comments>http://code.9enjoy.com/asp/nohtml-%e5%8e%bb%e6%8e%89html%e4%bb%a3%e7%a0%81/#comments</comments> <pubDate>Thu, 20 Mar 2008 21:14:37 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[html]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=12</guid> <description><![CDATA[function nohtml(str)<br/> dim re<br/> Set re=new RegExp<br/> re.IgnoreCase =true<br/> re.Global=True<br/> re.Pattern="(\<.[^\<]*\>)"<br/> str=re.replace(str," ")<br/> re.Pattern="(\<\/[^\<]*\>)"<br/> str=re.replace(str," ")<br/> nohtml=str<br/> set re=nothing<br/>end function...
]]></description> <content:encoded><![CDATA[<p>function nohtml(str)<br/> dim re<br/> Set re=new RegExp<br/> re.IgnoreCase =true<br/> re.Global=True<br/> re.Pattern=&#8221;(\<.[^\<]*\>)&#8221;<br/> str=re.replace(str,&#8221; &#8220;)<br/> re.Pattern=&#8221;(\<\/[^\<]*\>)&#8221;<br/> str=re.replace(str,&#8221; &#8220;)<br/> nohtml=str<br/> set re=nothing<br/>end function</p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=12&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/nohtml-%e5%8e%bb%e6%8e%89html%e4%bb%a3%e7%a0%81/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk
Database Caching 8/14 queries in 0.075 seconds using disk

Served from: code.itlearner.com @ 2012-02-07 02:06:19 -->
