【发布时间】:2013-06-18 18:08:01
【问题描述】:
{{if production_country != null || production_year != null}}
<h3 class="heading">Details</h3>
<p><b>${production_country} ${production_year}</b>, {{html roles}}</p>
{{/if}}
如何创建 OR 语句。这在我的 jquery 模板中不起作用..
【问题讨论】:
-
我有 2 个变量“生产年份”和“生产国家”。当其中一个变量为空时,我不想在段落中显示标题。我如何在我的 jquery 模板的 if 语句中做到这一点?当我使用管道'||'时它总是显示错误
标签: javascript jquery jquery-templates