asp 识别手机浏览网页并跳转到指定页面

2025-03-10 16:25:44
推荐回答(2个)
回答1:

查看 环境变量里面的 http 响应类型 HTTP_ACCEPT 是否有 wap的信息
<%
if InStr(LCase(Request.ServerVariables("HTTP_ACCEPT")),"text/vnd.wap.wml")>0 then
response.redirect "wap.asp" '如果是手机访问则跳转到wap.asp
else
response.redirect "index.asp" '如果电脑访问跳转到首页
end if
response.end
%>

回答2:

用跳转页面