Recommended: ASP implements the judgment of IE address bar parameters When the address bar does not have the parameter "id": The following is the referenced content: Request.QueryString[ID] == nullConvert.ToString(Request.QueryString[ID]
| The following is the quoted content: function CheckURL(byval A_strUrl) set XMLHTTP = Server.CreateObject(Microsoft.XMLHTTP) XMLHTTP.open HEAD,A_strUrl,false XMLHTTP.send() CheckURL=(XMLHTTP.status=200) set XMLHTTP = nothing end function Dim imgurl imgurl=UploadFiles/2007829144940734.gif if CheckURL(imgurl) then response.write picture exists else response.write picture does not exist end if Determine whether the remote image exists [js code] { var oReq = new ActiveXObject(Microsoft.XMLHTTP) oReq.open(Get,UploadFiles/2007829144941621.gif,false); oReq.send(); //alert(oReq.status) if(oReq.status==404) alert('not exists'); else alert(exist) } |
Share: Several writing methods of server-side VBScript and JScript with the same characteristics This article demonstrates several important applications of ASP server-side scripts. Table of Contents: 1. Traverse collection/object 1.1 VBScript Traverse form collection 1.2 JScript Traverse form collection 2. Transform value of variables as variables, and assign value 2.1 VBScript Transform value of variables as variables