How can you detect the version of a browser?

后端 未结 28 2064
佛祖请我去吃肉
佛祖请我去吃肉 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:03

    Use this: http://www.quirksmode.org/js/detect.html

    alert(BrowserDetect.browser); // will say "Firefox"
    alert(BrowserDetect.version); // will say "3" or "4"
    

提交回复
热议问题