How can I detect Internet Explorer (IE) and Microsoft Edge using JavaScript?

前端 未结 13 948
小鲜肉
小鲜肉 2020-11-30 02:57

I\'ve looked around a lot, and I understand that there\'s a lot of ways to detect internet explorer.

My problem is this: I have an area on my HTML document, that when

13条回答
  •  借酒劲吻你
    2020-11-30 03:19

    I'm using UAParser https://github.com/faisalman/ua-parser-js

    var a = new UAParser();
    var name = a.getResult().browser.name;
    var version = a.getResult().browser.version;
    

提交回复
热议问题