
Untitled
By: a guest on
May 5th, 2012 | syntax:
None | size: 0.44 KB | hits: 10 | expires: Never
What would make Internet Explorer NOT process conditional comments properly?
<script type="text/javascript">
...
<!-- CODE A -->
<!--[if IE]>
url = "http://" + "..." + "&var=1";
<![endif]-->
<!-- CODE B -->
<!--[if !IE]> -->
url = "http://" + "..." + "&var=1";
<!-- <![endif]-->
...
</script>
var IE = /*@cc_on!@*/false;
if (IE) {
url = "http://" + "..." + "&var=1";
} else {
url = "http://" + "..." + "&var=1";
}