小编ann*_*mae的帖子

iPhone/Android /等检测,Mootools方式?

是否有Mootools方式来检测iPhone/Android /其他?我有这个Vanilla JS脚本:

if ( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/BlackBerry/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/Palm/i) )
{
   window.location = 'address-to-iphone-site';
}
Run Code Online (Sandbox Code Playgroud)

我知道如何为浏览器(jsfiddle,但不是智能手机)这样做.
任何帮助都会受到欢迎.

iphone mootools android detection

0
推荐指数
1
解决办法
2274
查看次数

标签 统计

android ×1

detection ×1

iphone ×1

mootools ×1