Analyzing apparatus h5 is android or ios

U = the navigator.userAgent var, App = of navigator.appVersion; 
var = isAndroid u.indexOf ( 'the Android')> -1 || u.indexOf ( 'the Linux')> -1; // uc browser terminal or Android
var isiOS = !! u.match (/ \ ( i [^;] +; (U;?) CPU + Mac OS X /);. // ios terminal

Guess you like

Origin www.cnblogs.com/weixuechao/p/11226791.html