在ASP中怎样获取某表内容中所有图片?
来源:百度文库 编辑:神马文学网 时间:2024/04/27 18:28:42
<%
'如何过滤图片的函数 function find_img(strtemp)
'测试时间 2006-7-7 下午(没有风扇的情况下-_-!!通过测试)
strtemp="ssssddddddddddssssdddddddddd"
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,"if Ubound(arrtemp)<=0 then response.Write "没有检测到图片标识" : exit function
response.Write "一共检测到图片标识数量:"&Ubound(arrtemp)&"
"
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 "返回统计:
"
response.Write "
1)过滤GIF格式图片共"&num_gif&"张
"&replace(url_gif,"|","
")
response.Write "
2)过滤JPG格式图片共"&num_jpg&"张
"&replace(url_jpg,"|","
")
response.Write "
3)过滤PNG格式图片共"&num_png&"张
"&replace(url_png,"|","
")
response.Write "
4)其他格式图片(BMP格式等)共"&num_other&"张
"&replace(url_other,"|","
") 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 %>
本文来自: 站长之家(http://www.doozz.com) 详细出处参考:http://www.doozz.com/View/30/30010102/1445.html
'如何过滤图片的函数 function find_img(strtemp)
'测试时间 2006-7-7 下午(没有风扇的情况下-_-!!通过测试)
strtemp="ssssddddddddddssssdddddddddd"
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,"if Ubound(arrtemp)<=0 then response.Write "没有检测到图片标识" : exit function
response.Write "一共检测到图片标识数量:"&Ubound(arrtemp)&"
"
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 "返回统计:
"
response.Write "
1)过滤GIF格式图片共"&num_gif&"张
"&replace(url_gif,"|","
")
response.Write "
2)过滤JPG格式图片共"&num_jpg&"张
"&replace(url_jpg,"|","
")
response.Write "
3)过滤PNG格式图片共"&num_png&"张
"&replace(url_png,"|","
")
response.Write "
4)其他格式图片(BMP格式等)共"&num_other&"张
"&replace(url_other,"|","
") 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 %>
本文来自: 站长之家(http://www.doozz.com) 详细出处参考:http://www.doozz.com/View/30/30010102/1445.html
在ASP中怎样获取某表内容中所有图片?
如何才能在asp中获取文章中的第一张图片地址
asp.net中怎样在页面间传值?
Excel中怎样在表头下衬张图片
在Windows2003中配置ASP
在ASP中使用RSS
在Java中获取系统属性
叶莺:在异性世界中获取辉煌
静坐 在宁静中获取健康!
保存在电脑里的图片怎样获取图片地址?
在ASP中使用类class
如何在ASP中连接MySQL数据库
在ASP.NET中使用Memcached
删除Word文档中所有图片
ASP.NET MasterPage 中图片路径的解决办法!
在HTML中获取正确的URL属性值
编辑:幸福是在呵护与感受中获取的
怎样在股市中赚钱?
在ASP中改善动态分页的性能
在ASP中使用FSO组件生成HTML页面
在ASP中轻松实现记录集分页显示 >> 正文
在ASP中轻松实现记录集分页显示
如何在asp.net中如何在线播放视频文件1
在Dreamweaver中构建ASP.net开发环境