How to detect Internet Explorer 11 and below versions?

后端 未结 4 1471
感动是毒
感动是毒 2020-12-29 08:02

I\'m wondering how I could detect if the user viewing my website is using Internet Explorer 11 or below versions with Javascript.

It should be compatible and

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 08:08

    Check for documentmode - the IE only property:

    if (document.documentMode) 
        alert('this is IE');
    

提交回复
热议问题