HTML5 var uaTest = /Android|webOS|Windows Phone|iPhone|ucweb|ucbrowser|iPod|iPad|BlackBerry/i.test(navigator.userAgent.toLowerCase());var touchTest = ...
HTML5
var uaTest = /Android|webOS|Windows Phone|iPhone|ucweb|ucbrowser|iPod|iPad|BlackBerry/i.test(navigator.userAgent.toLowerCase());
var touchTest = 'ontouchend' in document;
if(!(uaTest && touchTest)){
window.location.href = 'www功能變數名稱';
}
web
var uaTest = /Android|webOS|Windows Phone|iPhone|ucweb|ucbrowser|iPod|iPad|BlackBerry/i.test(navigator.userAgent.toLowerCase());
var touchTest = 'ontouchend' in document;
if(uaTest && touchTest){
window.location.href = 'wap功能變數名稱';
}