Function FilterHTML(str)
              Dim re,cutStr
              Set re=new RegExp
              re.IgnoreCase =True
              re.Global=True
              re.Pattern="<(.[^>]*)>"
              str=re.Replace(str,"")   
              set re=Nothing

              str=Replace(str,"&nbsp","")
              str=Replace(str,chr(10),"")
              str=Replace(str,chr(13),"")
              str=Replace(str," ","")
              str=Replace(str," ","")

              Dim l,t,c,i
              l=Len(str)
              t=0
              For i=1 to l
                  c=Abs(Asc(Mid(str,i,1)))
                  If c>255 Then
                      t=t+2
                  Else
                      t=t+1
                  End If
                  cutStr=str
              Next
             
              FilterHTML= cutStr
          End Function
          posted on 2010-07-26 23:35 sanmao 閱讀(107) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 长岭县| 方山县| 龙江县| 普兰店市| 鹿邑县| 西城区| 通渭县| 永城市| 宽甸| 正阳县| 禄劝| 电白县| 化州市| 巩留县| 邵东县| 当涂县| 临沭县| 长海县| 盘锦市| 徐水县| 九龙城区| 吉首市| 江山市| 咸阳市| 那坡县| 长泰县| 娄烦县| 修文县| 南城县| 宁陕县| 集贤县| 鄢陵县| 岑巩县| 吉木乃县| 登封市| 永登县| 新竹县| 高碑店市| 南宁市| 泰和县| 渑池县|