Return to Snippet

Revision: 25841
at April 11, 2010 23:20 by djmicahelb


Initial Code
<script type="text/javascript">
/*@cc_on

  @if (@_jscript_version == 9)
    document.write("You are using IE9");

  @elif (@_jscript_version == 5.8)
    document.write("You are using IE8");
    
  @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
    document.write("You are using IE7");

  @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
    document.write("You are using IE6");

  @elif (@_jscript_version == 5.5)
    document.write("You are using IE5.5");

  @else
    document.write("You are using IE5 or older");

  @end

@*/
</script>

Initial URL


Initial Description
Use this to filter out Ie or other browsers using Javascript

Initial Title
Conditional Comments for Javascript

Initial Tags


Initial Language
JavaScript