How can you detect the version of a browser?

后端 未结 28 2065
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-21 23:35

I\'ve been searching around for code that would let me detect if the user visiting the website has Firefox 3 or 4. All I have found is code to detect the type of browser but

28条回答
  •  借酒劲吻你
    2020-11-22 00:19

    The bowser JavaScript library offers this functionality.

    if (bowser.msie && bowser.version <= 6) {
      alert('Hello China');
    }
    

    It seems to be well maintained.

提交回复
热议问题