Javascript to detect an old Internet Explorer and offer to download newer browser(s)

前端 未结 4 1737
甜味超标
甜味超标 2021-01-16 04:22

I\'m looking for something good-loking that I can paste on a page and be done with it.

The script should detect IE versions older than 9 and show a nice popup with l

4条回答
  •  醉话见心
    2021-01-16 05:05

    When I first posted this answer, the modern.IE project were pushing the IE6 countdown initiative, part of which was the provision of a IE detection snippet and hosted image used to warn users that they're using an old browser.

    I originally linked to http://www.ie6countdown.com/ which now redirects to an area on modern.IE which no longer provides the snippet and image. So, for prosperity and reference, here is the code they were sharing and the original banner image hosted on imgur:

    
    

    If you want to change this to detect IE versions less than 9 just change the first bit of the code to this:

    
         
     
    热议问题