iPad检测
通过查看
userAgent属性,您应该能够检测到iPad用户:
var is_iPad = navigator.userAgent.match(/iPad/i) != null;
iPhone / iPod检测
同样,
platform用于检查iPhone或iPods等设备的属性:
function is_iPhone_or_iPod(){ return navigator.platform.match(/i(Phone|Pod))/i)}
iPad检测
通过查看
userAgent属性,您应该能够检测到iPad用户:
var is_iPad = navigator.userAgent.match(/iPad/i) != null;
iPhone / iPod检测
同样,
platform用于检查iPhone或iPods等设备的属性:
function is_iPhone_or_iPod(){ return navigator.platform.match(/i(Phone|Pod))/i)}