2014-03-13 124 views

回答

3

看最精彩的答案来源与这个网址:

What is the best way to detect a mobile device in jQuery?

从该线程目前的方法:

var isMobile = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/); 

Jq uery:

$.browser.device = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())); 
+0

但不是android平板电脑,平板电脑,这段代码表明它是一个手机! – Miguel

相关问题