How to detect IE 11 with javascript in Asp.net

后端 未结 10 1913
暖寄归人
暖寄归人 2020-12-01 05:04

Hello I want to detect the Browser , IE 8 or more will be appropriate for me. For this i used following code but it fails for IE 11 . For other its detecting properly.

10条回答
  •  青春惊慌失措
    2020-12-01 05:19

    Use !(window.ActiveXObject) && "ActiveXObject" in window to detect IE11 explicitly.

    To detect any IE version, use window.ActiveXObject || "ActiveXObject" in window instead.

提交回复
热议问题