好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > 一個asp替換函數img里面多余的代碼

一個asp替換函數img里面多余的代碼

熱門標簽:高質量的電銷外呼系統 友邦互聯電銷機器人違法嗎 電銷機器人采購 地圖標注還可以做嗎 宿州防封外呼系統平臺 外呼系統怎么話費 無營業執照地圖標注教學 硅基電話機器人加盟 滴滴地圖標注上車點
%
Response.Write(Server.HTMLEncode(FixImg("img onclick=""if(this.widthgt;screen.width-461) window.open('qq/20082181405371.jpg');"" alt="""" border=""0"" src=""qq/20082181405371.jpg"" />")))
%>
%
'功能:將IMG代碼格式化為img src="XXX" />格式.
Function FixImg(sString)

    Dim sReallyDo, regEx, iReallyDo
    Dim oMatches, cMatch
    Dim tStartTime, tEndTime
    If IsNull(sString) Then
        FixImg = ""
        Exit Function
    End If
    sReallyDo = sString
    On Error Resume Next
    sReallyDo = Replace(sReallyDo, vbCr, " ")
    sReallyDo = Replace(sReallyDo, vbLf, " ")
    sReallyDo = Replace(sReallyDo, vbTab, " ")
    sReallyDo = Replace(sReallyDo, "img ", vbCrLf  "img ", 1, -1, 1)
    sReallyDo = Replace(sReallyDo, "/>", " />", 1, -1, 1)
    sReallyDo = ReplaceAll(sReallyDo, "= ", "=", True)
    sReallyDo = ReplaceAll(sReallyDo, "> ", ">", True)
    sReallyDo = Replace(sReallyDo, ">", ">"  vbCrLf  "")
    sReallyDo = Trim(sReallyDo)
    On Error GoTo 0
    Set regEx = New RegExp
    regEx.IgnoreCase = True
    regEx.Global = True
    '//去除onclick,onload等腳本
    regEx.Pattern = "\s[on].+?=([\""|\'])(.*?)1"
    sReallyDo = regEx.Replace(sReallyDo, "")
    '//將SRC不帶引號的圖片地址加上引號
    regEx.Pattern = "img.*?ssrc=([^\""\'\s][^\""\'\s>]*).*?>"
    sReallyDo = regEx.Replace(sReallyDo, "img src=""$1"" />")
    '//正則匹配圖片SRC地址
    regEx.Pattern = "img.*?ssrc=([\""\'])([^\""\']+?)1.*?>"
    sReallyDo = regEx.Replace(sReallyDo, "img src=""$2"" />")
    FixImg = sReallyDo
End Function
%>
%
'功能:返回字符串,其中指定數目的某子字符串 全部 被替換為另一個子字符串。
'來源:http://jorkin.reallydo.com/article.asp?id=406
'需要Bint函數:http://jorkin.reallydo.com/article.asp?id=395

Function ReplaceAll(sExpression, sFind, sReplaceWith, bAll)
    If IsNull(sExpression) Then ReplaceAll = "" : Exit Function
    If (StrComp(bAll, "True", 1) = 0) Or (CBool(Bint(bAll)) = True) Then
        Do While InStr( 1, sExpression, sFind, 1) > 0
            sExpression = Replace(sExpression, sFind, sReplaceWith, 1, -1, 1)
            If InStr( 1, sReplaceWith , sFind , 1) >0 Then Exit Do
        Loop
    Else
        Do While InStr(sExpression, sFind) > 0
            sExpression = Replace(sExpression, sFind, sReplaceWith)
            If InStr(sReplaceWith, sFind ) > 0 Then Exit Do
        Loop
    End If
    ReplaceAll = sExpression
End Function
%>
%
'功能:只取數字
'來源:http://jorkin.reallydo.com/article.asp?id=395

Function Bint(Str)
    Str = Trim(Str)
    If Str = "" Or IsNull(Str) Or Not IsNumeric(Str) Then Str = "0"
    Bint = Round(Str, 0)
End Function
%>

標簽:七臺河 宣城 雅安 廣元 江門 新余 錫林郭勒盟 儋州

巨人網絡通訊聲明:本文標題《一個asp替換函數img里面多余的代碼》,本文關鍵詞  一個,asp,替換,函數,img,里面,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《一個asp替換函數img里面多余的代碼》相關的同類信息!
  • 本頁收集關于一個asp替換函數img里面多余的代碼的相關信息資訊供網民參考!
  • 推薦文章