2013-09-22 49 views

回答

4

嘗試此

navigator.userAgent.match(/(iPad|iPhone);.*CPU.*OS 7_\d/i) 
23

試試這個(檢測的iPod touch以及):

navigator.userAgent.match(/(iPad|iPhone|iPod touch);.*CPU.*OS 7_\d/i) 
+0

感謝您的解決方案 – Viktor

0
/iP(ad|hone|od)/.test(navigator.userAgent) 

給出簡單的T/F 。

+0

這不僅僅檢測版本7 ... – Jon