// determines the type of client function deviceType () { var U = the navigator.userAgent; var isAndroid = u.indexOf ( 'the Android')> -1 || u.indexOf ( 'Adr')> -1; // Android Andrews var isiOS u.match !! = (/ \ (I [^;] +; (the U-;?) the CPU the Mac the OS X-+ /);. // iOS Apple IF (isAndroid) { return "the Android" } the else IF (isiOS) { return "of Ios" } }
Android or IOS judgment
Guess you like
Origin www.cnblogs.com/helloNico/p/12177871.html
Ranking