Javascript redirect for Internet Explorer browser version user agent?

前端 未结 2 1858
夕颜
夕颜 2020-12-19 19:51

I found out that my javascript-intensive web site doesn\'t work reliably (or at all) in IE9.

It works, (usually, but not always) with the compatibility mode meta ta

2条回答
  •  情话喂你
    2020-12-19 20:25

    The simplest way would be to use IE Conditionals.

    Note: IE10 and beyond have removed support for this feature. For modern browsers the widely accepted way of conditionally displaying content for compatibility purposes is using feature detection. Modernizr is a popular library built for handling feature detection.

    For example:

    
    

    Examples from the conditional site:

    
    

    You are not using Internet Explorer.

    You are using a downlevel browser.

提交回复
热议问题