Skip to content Skip to sidebar Skip to footer

How To Switch Off Javascript Programmatically Only For Internet Explorer 7?

I want to turn off JavaScript using JavaScript (and/or jQuery) code, only if the page is viewed in IE7. How can this be done? Would be grateful for the magic code snippet!

Solution 1:

Use conditional comments.

http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx

<![if !(IE 7)]>
    // Script tags here
<![endif]>

Solution 2:

Solution 3:

You can´t turn JavaScript off. You can however exclude IE7 by using Downlevel-revealed Conditional Comments.

Post a Comment for "How To Switch Off Javascript Programmatically Only For Internet Explorer 7?"