Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.44 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. What would make Internet Explorer NOT process conditional comments properly?
  2. <script type="text/javascript">
  3.  
  4.  ...
  5.  
  6.  <!-- CODE A -->
  7.  <!--[if IE]>
  8.    url = "http://" + "..." + "&var=1";
  9.  <![endif]-->
  10.  
  11.  <!-- CODE B -->
  12.  <!--[if !IE]> -->
  13.    url = "http://" + "..." + "&var=1";
  14.  <!-- <![endif]-->
  15.  
  16.  ...
  17.  
  18. </script>
  19.        
  20. var IE = /*@cc_on!@*/false;
  21.        
  22. if (IE) {
  23.     url = "http://" + "..." + "&var=1";
  24. } else {
  25.     url = "http://" + "..." + "&var=1";
  26. }