2013-09-22 78 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