如何過(guò)濾html中的回車(chē)空格_ASP教程
推薦:ASP中的EVAL函數(shù)使用教程近兩日,學(xué)習(xí)了ASP的EVAL函數(shù)。感覺(jué)上很實(shí)用,如果使用得當(dāng),能減輕很多代碼的編寫(xiě)量,也使得代碼更加簡(jiǎn)潔明了。 EVAL函數(shù)的原型: EVAL(expression) 其中expression是字符串參數(shù),可以是表達(dá)式,可以是變量,甚至可以是語(yǔ)句。但都是以字符串的形式出現(xiàn)。 例如 b=EVA
Function FormatStr(str)
Dim s1,s2
If str<>"" then
str=replace(replace(Trim(str),chr(32)&chr(32),""),chr(9),"")
DO While (instr(str,">")>0 and instr(str,"<")>0)
s1=InStr(str,"<")
s2=Instr(s1,str,">")
If s1>0 and s2>0 then
str=replace(str,mid(str,s1,s2-s1+1),"")
End if
Loop
str=replace(replace(str,"<","<"),">",">")
str=Replace(Replace(Replace(replace(replace(str,chr(13),""),chr(10),""),"""","”"),"'","’")," ","")
FormatStr=str
Else
FormatStr=""
End if
End Function
分享:ASP 高亮顯示不區(qū)分大小寫(xiě)的關(guān)鍵字今日,碰到一個(gè)問(wèn)題:如何在網(wǎng)頁(yè)中高亮顯示不區(qū)分大小寫(xiě)的關(guān)鍵字 例如:文本abcaBcabCaBCabcaBCa,關(guān)鍵字bc,在不區(qū)分大小寫(xiě)的情況,一共有6個(gè)匹配項(xiàng)。 則在網(wǎng)頁(yè)中顯示的是abcaBcabCaBCabcaBCa。 很多人,想到是replace函數(shù)。原型為 Replace(string,find,replacewith[,
- ASP中的EVAL函數(shù)使用教程
- ASP 高亮顯示不區(qū)分大小寫(xiě)的關(guān)鍵字
- 利用XML序列化實(shí)現(xiàn)程序配置文件
- ASP中七種實(shí)現(xiàn)分頁(yè)顯示的方法
- ASP中常用的變量命名規(guī)則
- 操作必須使用一個(gè)可更新的查詢”錯(cuò)誤的解決辦法
- [ASP]GetRows的用法解析
- HTML在線編輯器的調(diào)用方法和使用方法詳解
- 關(guān)于ASP的日期計(jì)算問(wèn)題
- ASP關(guān)于頁(yè)面緩存清除的方法小結(jié)
- iis7、iis8配置備份還原教程
- Asp 函數(shù)介紹
- 相關(guān)鏈接:
- 教程說(shuō)明:
ASP教程-如何過(guò)濾html中的回車(chē)空格。