安科网

javascript判断当前是安卓平台还是ios平台

dongruanlong 2016-10-13

if (/android/i.test(navigator.userAgent)){
    // todo : android
}
 
if (/ipad|iphone|mac/i.test(navigator.userAgent)){
    // todo : ios
}
dongruanlong

dongruanlong

相关推荐

是安卓5.0悲剧,还是谷歌牛,修复安卓5.0bug,让人无奈

最近,谷歌宣布将要修复之前出现在安卓5.0系统上与“Mobile radio active”相关的电池续航Bug,该Bug会莫名其妙耗光手机的电量。不过,google的修复方法也是让人醉了:如果想要增加续航,用户必须升级到Android6.0棉花糖系统。对

zhengguoliangyls 0喜欢 / 0评论 2015-08-22
Copyright © 2013 - 2019 Ancii.com