Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/428.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 条件编译已关闭_Javascript - Fatal编程技术网

Javascript 条件编译已关闭

Javascript 条件编译已关闭,javascript,Javascript,我得到一个javascript错误: 条件编译已关闭 我找到了要修复的链接: 但是在添加这个字段之后 /@抄送@/ 我发现了另一个新的javascript错误: 预期“)” 如何修复它?感谢以下是一段受影响的代码,用于确定是否启用条件注释: var allowsCC = /*@cc_on!@*/!1; if(allowsCC) alert("Conditional comments are allowed!!!"); else alert("Conditional comments ar

我得到一个javascript错误:

条件编译已关闭

我找到了要修复的链接: 但是在添加这个字段之后

/@抄送@/

我发现了另一个新的javascript错误:

预期“)”


如何修复它?感谢

以下是一段受影响的代码,用于确定是否启用条件注释:

var allowsCC = /*@cc_on!@*/!1;
if(allowsCC)
  alert("Conditional comments are allowed!!!");
else
  alert("Conditional comments are not allowed.");

正如您可能已经确定的,allowsCC将被设置为一个布尔值,该值指示是否允许使用条件注释。

???你能提供更多的解释吗?你是在哪个浏览器中看到的?你的HTML页面有doctype吗?