Conditional compilation is activated by using the @cc_on statement, or using an @if or @set statement. Some typical uses for conditional compilation include using new features in JavaScript, embedding debugging support into a script, and tracing code execution.
Always place conditional compilation code in comments, so that hosts (like Netscape Navigator) that do not support conditional compilation will ignore it.
/*@cc_on @*/ /*@if (@_jscript_version >= 4) alert("JavaScript version 4 or better"); @else @*/ alert("Conditional compilation not supported by this scripting engine."); /*@end @*/
浙公网安备 33010602011771号