手機訪問跳轉
① 怎麼讓網站手機訪問自動跳轉到手機版
更改瀏覽器UA標識即可,此處以QQ瀏覽器為例:
一、打開QQ瀏覽器,在如下界面,點擊我的
② 手機訪問實現無縫跳轉怎麼實現
能否自動訪問就看你手機安裝的二維碼掃描軟體的功能了大部分二維碼掃描軟體讀取到網址會自動跳轉,有些會先詢問你是否打開
③ 怎樣實現手機訪問網站時自動跳轉到wap
手機訪問網站時自動跳轉到wap目錄或wap站點自動識別跳轉代碼:
<%
HTTP_ACCEPT=Request.ServerVariables("HTTP_ACCEPT") '獲取瀏覽器的信息
HTTP_USER_AGENT=LCase(Request.ServerVariables("HTTP_USER_AGENT")) '獲取AGENT
HTTP_X_WAP_PROFILE=Request.ServerVariables("HTTP_X_WAP_PROFILE") 'WAP特定信息 品牌機自帶瀏覽器都會有
HTTP_UA_OS=Request.ServerVariables("HTTP_UA_OS") '手機系統,電腦為空
HTTP_VIA=LCase(Request.ServerVariables("HTTP_VIA")) '網關信息
Dim WapStr
WAPstr=False
If ubound(split(HTTP_ACCEPT,"vnd.wap"))>0 Then WAPstr=True
If HTTP_USER_AGENT="" Then WAPstr=True
If HTTP_X_WAP_PROFILE<>"" Then WAPstr=True
If HTTP_UA_OS<>"" Then WAPstr=True
IF ubound(split(HTTP_VIA,"wap"))>0 Then WAPstr=True
IF ubound(split(HTTP_USER_AGENT,"netfront"))>0 Then WAPstr=True
IF ubound(split(HTTP_USER_AGENT,"iphone"))>0 Then WAPstr=True
IF ubound(split(HTTP_USER_AGENT,"opera mini"))>0 Then WAPstr=True
IF ubound(split(HTTP_USER_AGENT,"ucweb"))>0 Then WAPstr=True
IF ubound(split(HTTP_USER_AGENT,"windows ce"))>0 Then WAPstr=True
IF ubound(split(HTTP_USER_AGENT,"symbianos"))>0 Then WAPstr=True
IF ubound(split(HTTP_USER_AGENT,"java"))>0 Then WAPstr=True
IF ubound(split(HTTP_USER_AGENT,"android"))>0 Then WAPstr=True
If WAPstr=True Then
response.redirect "http://boaer.com/wap" '手機站WAP地址一定要完整絕對地址
response.end
End if
%>
④ 就是手機訪問電腦網頁,然後手機跳轉到手機的WAP頁,怎麼做到的4
首先你的手機要支持www或WAP2.0頁面;其次,你訪問的網站要有WAP(手機)版網頁,這樣就能實現跳轉,謝謝採納
⑤ 如何識別手機瀏覽器並跳轉到指定網頁
使用方法:將下面代碼放入你需要識別頁面的hade標簽前面,然後將下面的http://m..com 修改為您的手機版站點的地址!
<!---識別手機或電腦的js開始--->
<script language="javascript">
(function(){
var res = GetRequest();
var par = res['index'];
if(par!='gfan'){
var ua=navigator.userAgent.toLowerCase();
var contains=function (a, b){
if(a.indexOf(b)!=-1){return true;}
};
//將下面的http://m.google.com改成你的wap手機版地址 如我的 http://m.yijile.com
var toMobileVertion = function(){
window.location.href = 'http://m.google.com/'
}
if(contains(ua,"ipad")||(contains(ua,"rv:1.2.3.4"))||(contains(ua,"0.0.0.0"))||(contains(ua,"8.0.552.237"))){return false}
if((contains(ua,"android") && contains(ua,"mobile"))||(contains(ua,"android") && contains(ua,"mozilla")) ||(contains(ua,"android") && contains(ua,"opera"))
||contains(ua,"ucweb7")||contains(ua,"iphone")){toMobileVertion();}
}
})();
function GetRequest() {
var url = location.search; //獲取url中"?"符後的字串
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for(var i = 0; i < strs.length; i ++) {
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
</script>
<!---識別手機或電腦的js結束--->
上面是我找來的,我不知道能不能用,但是希望對你有幫助。
⑥ 手機訪問跳轉手機域名
這個需要單獨設置一個手機二級域名,綁定到電腦站的主機ip上,程序中設置成根據域名訪問對應設備。
⑦ 如何讓手機訪問網站自動跳轉到WAP版網頁
主要功能就是在手機上訪問網站時自動跳轉到網站mobile或者wap版頁面。也就是說這個網站有手機版目錄,但是手機上訪問域名時不會自動跳轉到手機版頁面,而是跳到電腦版首頁去了。
前提是網站有mobile目錄或者wap目錄,
在模板文件夾找到header.html,在</head>前面拷貝上如下內容,其中跳轉地址修改成自己網站的mobile或者wap地址即可。
<scripttype="text/javascript">varmobileAgent=newArray("iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire");varbrowser=navigator.userAgent.toLowerCase();varisMobile=false;for(vari=0;i<mobileAgent.length;i++){if(browser.indexOf(mobileAgent[i])!=-1){
isMobile=true;//alert(mobileAgent[i]);
location.href='http://www.lanmanet.cn/mobile/';break;
}
}</script>
⑧ js判斷手機訪問並跳轉到相應頁面
我以前用過一個不太科學方法暫時性的處理過這個問題。就是判斷獲取屏幕的高度和寬度來判斷是手機還是電腦~
⑨ 手機訪問怎麼跳轉到手機網站
加一段js代碼判斷用戶所使用的設備即可;
當用戶使用PC訪問時就顯示PC端網站;
當用戶使用手機訪問時就跳轉到建設好的移動網站即可。
比如:
<script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="http://www.8888ln.com/m/index.php";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
⑩ 手機訪問自動跳轉至手機版網站如何實現
<scripttype="text/javascript">
if(/AppleWebKit.*Mobile/i.test(navigator.userAgent)||(/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="http://www.shanshui666.com/"}else{if(/iPad/i.test(navigator.userAgent)){}else{window.location.href="http://www.shanshui666.com/"}}}catch(e){}}};
</script>
這是是手機訪問網站自動跳轉到手機站的js代碼,把上邊的兩個網址改成自己的手機wap網址就可以了,真是可用