How can I target only Internet Explorer 11 with JavaScript?

后端 未结 7 2306
一个人的身影
一个人的身影 2020-11-27 03:23

What\'s the least error-prone way to target just IE11 with JavaScript?

Note: This should really only be done for analytics or informing the user what browser they\'r

相关标签:
7条回答
  • 2020-11-27 03:56
    var isIE11 = !!navigator.userAgent.match(/Trident\/7.0; rv 11/);
    

    Source: http://www.nczonline.net/blog/2013/07/02/internet-explorer-11-dont-call-me-ie/

    0 讨论(0)
提交回复
热议问题