国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

在ASP中怎樣獲取某表內容中所有圖片?

2019-11-17 04:16:37
字體:
來源:轉載
供稿:網友

<%
'如何過濾圖片的函數 function find_img(strtemp)
'測試時間 2006-7-7 下午(沒有風扇的情況下-_-!!通過測試)
strtemp="ssss<img alt=""sss"" src=""find_img(strtemp)
function find_img(strtemp)
dim arrtemp
dim i,url_gif,num_gif,url_jpg,num_jpg,url_png,num_png,url_other,num_other
arrtemp=split(strtemp,"<img")
if Ubound(arrtemp)<=0 then response.Write "沒有檢測到圖片標識" : exit function
response.Write "一共檢測到圖片標識數量:"&Ubound(arrtemp)&"<br>"
for i=1 to Ubound(arrtemp)
temp=cutstr(cutstr(cutstr(arrtemp(i),"right"," />"),"left","src="""),"right","""")
ext=Ucase(right(temp,4))
select case ext
case ".GIF"
url_gif = url_gif&"|"&temp
num_gif = num_gif + 1
case ".JPG"
url_jpg = url_jpg&"|"&temp
num_jpg = num_jpg + 1
case ".PNG"
url_png = url_png&"|"&temp
num_png = num_png + 1
case else
url_other = url_other&"|"&temp
num_other = num_other + 1
end select
next
response.Write "<font color=green>返回統計:</font><br>"
response.Write "<hr><font color=blue>1)過濾GIF格式圖片共"&num_gif&"張</font><br>"&replace(url_gif,"|","<br>")
response.Write "<hr><font color=blue>2)過濾JPG格式圖片共"&num_jpg&"張</font><br>"&replace(url_jpg,"|","<br>")
response.Write "<hr><font color=blue>3)過濾PNG格式圖片共"&num_png&"張</font><br>"&replace(url_png,"|","<br>")
response.Write "<hr><font color=blue>4)其他格式圖片(BMP格式等)共"&num_other&"張</font><br>"&replace(url_other,"|","<br>")

end function

function cutstr(temp,direct,str)
if direct="right" then '剪去標識符右邊的內容(包括標識符)
cutstr = left(temp,instr(temp,str)-1)
else '剪去標識符左邊的內容(包括標識符)
cutstr = right(temp,len(temp)-instr(temp,str)-len(str)+1)
end if
end function

%>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 江安县| 屯门区| 电白县| 沙坪坝区| 井研县| 松滋市| 芮城县| 任丘市| 伊川县| 宜城市| 大同县| 开原市| 南城县| 福鼎市| 岳阳县| 茂名市| 东兴市| 项城市| 三台县| 万盛区| 无为县| 苍南县| 四子王旗| 马山县| 黎城县| 资兴市| 布拖县| 砀山县| 手游| 正阳县| 广东省| 始兴县| 丽水市| 视频| 三河市| 武鸣县| 山阳县| 灵璧县| 萍乡市| 洮南市| 乌兰浩特市|