Disable script if user is browsing IE8

I need javascript code to disable script i if the user is browsing using Internet Explorer 8.

+5
source share
4 answers

Try it.

To disable script for IE 8

<!--[if !(IE 8)]><!-->
    <script src="path/to/external/script"></script>
    <script>
        // your inline script goes here
    </script>
<!--<![endif]-->

To disable script for IE 8 and above

<!--[if !(gte IE 8)]><!-->
    <script src="path/to/external/script"></script>
    <script>
        // your inline script goes here
    </script>
<!--<![endif]-->

Read bobince's answer: Conditional commentary for “Except IE8”?

+13
source

- script, , IE, . , , - 1-, , IE.

- :

<!--[if (gte IE 8) ]><script>deactivate1stScript();</script><![endif]-->

, IE , JavaScript, IE ( IE8 )

, @Quentin , . , script, Canvas SVG, , ​​ Modernizr, .

+2

IE8 JavaScript

, javascript functuion, , script, if, switch

+1

All Articles