Pick up the Android version in the browser by Javascript

后端 未结 9 1232
小蘑菇
小蘑菇 2020-12-02 05:09

I\'m building a web app and wanting to disable transitions effects on Android devices under version 3.0.

Is there anyway to pick up the Android version number by Ja

9条回答
  •  無奈伤痛
    2020-12-02 05:52

    I can't comment because I don't have enough rep... Just wanted to add that I had to change neiker's code to

    var match = ua.match(/Android\s([0-9\.]*)/i);
    

    to make it case insensitive because the Galaxy S3 was returning "android" instead of Android in its user agent

提交回复
热议问题