All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
判断远程图片是否存在_[XML教程]

Writer: 归海一刀 Article type: Programming skills(编程技巧) Time: 2014/3/20 5:15:15 Browse times: 298 Comment times: 0

判断远程图片是否存在_[XML教程]


Head photo

Go homepage
Upload pictures
Write articles

判断远程图片是否存在_[XML教程]























收集了几种判断远程图片是否存在的方法




js判断:








判断远程图片是否存在,不存在的话替换成设计家园的logo,代码如下:




onerror="javascript:this.src='/images/logo1.gif'">

asp判断:




<%
url= "/images/logo1.gif"
'on error resume next
Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
xmlHttp.open "get ",url,false
xmlHttp.send
if xmlHttp.Status <> 200 then
response.write "不存在"
else
response.write "存在"
end if
%>




设计家园 收集整理











































There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.