Javascript Jquery tmpl创建or语句 {{如果生产国!=null | |生产年!=null} 细节
${生产国}${生产年},{{html角色} {{/if} 如何创建OR语句。这在我的jquery模板中不起作用。而不是: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
{{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 !=""}}