Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/408.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 Jquery tmpl创建or语句 {{如果生产国!=null | |生产年!=null} 细节_Javascript_Jquery_Jquery Templates - Fatal编程技术网

Javascript Jquery tmpl创建or语句 {{如果生产国!=null | |生产年!=null} 细节

Javascript Jquery tmpl创建or语句 {{如果生产国!=null | |生产年!=null} 细节,javascript,jquery,jquery-templates,Javascript,Jquery,Jquery Templates,${生产国}${生产年},{{html角色} {{/if} 如何创建OR语句。这在我的jquery模板中不起作用。而不是: {{if production_country != null || production_year != null}} <h3 class="heading">Details</h3> <p><b>${production_country} ${production_year}</b>, {{h

${生产国}${生产年},{{html角色}

{{/if} 如何创建OR语句。这在我的jquery模板中不起作用。

而不是:

{{if production_country != null || production_year != null}}
    <h3 class="heading">Details</h3>
    <p><b>${production_country} ${production_year}</b>, {{html roles}}</p>
{{/if}}
使用:

从你的问题来看,我不确定你是否需要确定生产国和生产年的价值。例如生产年价值=“”

见这个问题:


我有两个变量“生产年”和“生产国”。当其中一个变量为空时,我不想用段落显示标题。我如何在jquery模板中的if语句中做到这一点?当我使用管道“| |”时,它总是显示错误
{{if production_country != null || production_year != null}}
{{if production_country !="" OR production_year !=""}}