ASP判断是手机还是电脑PC访问网站

ASP 1654 0 2014-07-29

ASP判断是手机还是电脑PC访问网站
<%
Function MobileOrPC()
If instr(LCase(request.servervariables("http_user_agent")),"iphone")>0
 or instr(LCase(request.servervariables("http_user_agent")),"android")>0
 or instr(LCase(request.servervariables("http_user_agent")),"mobile")>0 Then
MobileOrPC=true
else
MobileOrPC=false
End If
End Function

IF MobileOrPC Then
response.write "手机访问"
ELSE
response.write "电脑访问"
END IF
%>

欢迎进行交流,QQ群号:59103908,作者:JAES

上一篇:jquery实现对联广告代码

下一篇:asp 去除最后一个字符的代码

讨论数量:0

请先登录再发表讨论。 2024-04-30

天涯网魂
3 杠 5 星
TA 的文章
TA 的随言
TA 的资源链