知识库

用ASP判断手机用户访问网站

来源: 本站    类别: 知识库    日期: 2016/2/2

 

代码如下
if InStr(LCase(Request.ServerVariables("HTTP_ACCEPT")),"text/vnd.wap.wml")>0 then
    response.redirect  "wap.asp" '如果是手机访问则跳转到wap.asp
    response.end
else
    response.redirect  "default.asp" '如果电脑访问跳转到首页
    response.end 
end if

相关文章


Copyright © 2004 - 2024 CNHWW Inc. All Rights Reserved
石家庄市征红网络科技有限公司版权所有 邮政编码:050051
服务电话:0311-85315152 13931185013 在线客服QQ:81447932 / 81447933 邮箱: cnhww@163.com