运行环境:ASP 模块功能:验证人事系统网页端能否正常打开,正常访问就跳转登陆页,否则就弹出提示窗口。 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <head> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> </head> <body> <% '检测人事系统是否打开(以验证网址进行检测) function aspurl(dz) on error resume next set xmlhttp=server.createobject("microsoft.xmlhttp") xmlhttp.open "get","http://",false 'http为验证网址 xmlhttp.send if xmlhttp.status <>200 then aspurl=false else aspurl=true end if end function dz=request.querystring("asp") if aspurl(dz) then response.Write "<script>document.location.href='http://';</script>" 'http为通过验证后跳转网址 else response.Write "<script>alert('人事系统维护中,请稍后重试或与管理员联系!');</script>" '未通过验证弹出提示信息 response.Write "<script>document.location.href='../index.html';</script>" '未通过验证跳转网址 end if %> </body></html> |