2014-03-13 138 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

相關問題