Wyłączenie skryptu na IE

0

Już nie mogę wytrzymać z tym IE , muszę wyłączyć skrypt bo nie działa prawidłowo na IE, już wykorzystałem te opcje (.... to jakiś skrypt ):

 <!--[if !IE]>
....
<![endif]-->
Skrypt wyłączany na każdej przeglądarce.

<!--[if !IE]><!-->
....
<!-- <![endif]-->
Skrypt nie zostaje wyłączony na IE

<![if !IE]>
....
<![endif]>
Skrypt nie zostaje wyłączony na IE
0

Dla najnowszych IE:

if (/MSIE 10/i.test(navigator.userAgent)) {
   // this is internet explorer 10
   window.alert('isIE10');
}

if(/MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent)){
    // this is internet explorer 9 and 11
    window.location = 'pages/core/ie.htm';
}

if (/Edge\/12./i.test(navigator.userAgent)){
   // this is Microsoft Edge
   window.alert('Microsoft Edge');
}
function msieversion() {
            var ua = window.navigator.userAgent;
            var msie = ua.indexOf("MSIE ");

            if (msie > 0)      // If Internet Explorer, return version number
                alert(parseInt(ua.substring(msie + 5, ua.indexOf(".", msie))));
            else                 // If another browser, return 0
                alert('otherbrowser');

            return false;
        }
<!--[if IE]>
According to the conditional comment this is IE<br />
<![endif]-->

<!--[if IE 6]>
According to the conditional comment this is IE 6<br />
<![endif]-->

<!--[if IE 7]>
According to the conditional comment this is IE 7<br />
<![endif]-->

<!--[if IE 8]>
According to the conditional comment this is IE 8<br />
<![endif]-->

<!--[if IE 9]>
According to the conditional comment this is IE 9<br />
<![endif]-->

<!--[if gte IE 8]>
According to the conditional comment this is IE 8 or higher<br />
<![endif]-->

<!--[if lt IE 9]>
According to the conditional comment this is IE lower than 9<br />
<![endif]-->

<!--[if lte IE 7]>
According to the conditional comment this is IE lower or equal to 7<br />
<![endif]-->

<!--[if gt IE 6]>
According to the conditional comment this is IE greater than 6<br />
<![endif]-->

<!--[if !IE]> -->
According to the conditional comment this is not IE 5-9<br />
<!-- <![endif]-->

http://www.quirksmode.org/css/condcom.html

0

Nie podałeś o jakie ie chodzi. Bo najnowszego nie da się już wykryć tak jak poprzednich.

0

Chodziło o każde IE. Użyłem w końcu skryptu php który sprawdza przeglądarkę z requesta i wyłącza skrypt dla IE , te dyrektywy niestety nie działy za dobrze.

0

A navigator.userAgent nie zadziała?

0

ja tam nie miałem problemu z tablesorter od ie > 9 :)

1 użytkowników online, w tym zalogowanych: 0, gości: 1