ASP怎樣可以獲得代碼中第一張圖片地址_ASP教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:ASP導(dǎo)出Excel數(shù)據(jù)的四種方法一、使用OWC 什么是OWC? OWC是office Web Compent的縮寫,即Microsoft的office Web組件,它為在Web中繪制圖形提供了靈活的同時也是最基本的機(jī)制。在一個intranet環(huán)境中,如果可以假設(shè)客
'把pattern 又修改了下'code要檢測的代碼
'http://m.dounai2.com/asp.asp
'leixing html 或者ubb
'nopic 代碼沒有圖片時默認(rèn)值
function toppic(code,leixing,nopic)
set regex = new regexp
regex.ignorecase = true
regex.global = true
if leixing = "html" then
regex.pattern = "<img(.*?)src\s?\=\s?(\u0022?)([^\u0022\/>] )"
else
regex.pattern = "\[img\]([^\u005B] )“
end if
set matches = regex.execute(code)
if regex.test(code) then
if leixing = "html" then
toppic = matches(0).submatches(3)
else
toppic = matches(0).submatches(0)
end if
else
toppic = nopic
end if
end function
code1 = "<img src=""1.gif"">"
pic = toppic(code1,"html","nopic.gif")
response.Write pic
分享:ASP進(jìn)階:用asp做的簡單搜索引擎代碼下面是庫中URLINDEX表:URL和Keywords字段分別添加了索引. URL 文本 (索引:有(無重復(fù))) Title 文本 Description 文本 Summary
相關(guān)ASP教程:
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁模板:ASP內(nèi)建對象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個小技巧
- eWebEditor v3.8 列目錄
- ASP無組件分頁實(shí)現(xiàn)思路及代碼
- 相關(guān)鏈接:
- 教程說明:
ASP教程-ASP怎樣可以獲得代碼中第一張圖片地址。