If Browser is Internet Explorer: run an alternative script instead

后端 未结 10 701
后悔当初
后悔当初 2020-11-29 05:11

I\'m using an image carousel script that is quite heavy on the browser. It works great in Opera and Chrome, half decent in FF and absolutely breaks my balls in IE. So i\'d l

10条回答
  •  悲哀的现实
    2020-11-29 05:35

    Try this: The systemLanguage and the userLanguage is undefined in all browser.

    if(navigator.userLanguage !== "undefined" && navigator.systemLanguage !== "undefined" && navigator.userAgent.match(/trident/i)) {
        alert("hello explorer i catch U :D")
      }
    

提交回复
热议问题