How do I detect IE 8 with jQuery?

前端 未结 12 1435
一生所求
一生所求 2020-11-30 19:14

I need to detect not only the browser type but version as well using jQuery. Mostly I need to find out if it is IE 8 or not.

I am not sure if I am doing it correctly

12条回答
  •  孤街浪徒
    2020-11-30 19:50

    document.documentMode is undefined if the browser is not IE8,

    it returns 8 for standards mode and 7 for 'compatable to IE7'

    If it is running as IE7 there are a lot of css and dom features that won't be supported.

提交回复
热议问题