<!--{if !$product.Capacity==0}--><li class="spec_list_odd" style="LIST-STYLE-TYPE: none; WIDTH: 490px; FLOAT: left; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 0px; MARGIN: 0px; PADDING-RIGHT: 0px; BACKGROUND-COLOR: rgb(245,245,245)">
<span class="p_s_name" style="WIDTH: 122px; FLOAT: left; PADDING-LEFT: 9px; DISPLAY: inline">Capacity</span><span class="p_s_value" style="WIDTH: 343px; FLOAT: right; DISPLAY: inline; PADDING-RIGHT: 9px">{$product.Capacity}</span><!--{/if}-->
<!--{if $product.Capacity neq ''} 或者 {if $prduct.Capacity}-->
<li class="spec_list_odd" style="LIST-STYLE-TYPE: none; WIDTH: 490px; FLOAT: left; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 0px; MARGIN: 0px; PADDING-RIGHT: 0px; BACKGROUND-COLOR: rgb(245,245,245)">
<span class="p_s_name" style="WIDTH: 122px; FLOAT: left; PADDING-LEFT: 9px; DISPLAY: inline">Capacity</span>
<span class="p_s_value" style="WIDTH: 343px; FLOAT: right; DISPLAY: inline; PADDING-RIGHT: 9px">{$product.Capacity}</span>
</li>
<!--{/if}-->
<li class="spec_list_odd" style="LIST-STYLE-TYPE: none; WIDTH: 490px; FLOAT: left; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 0px; MARGIN: 0px; PADDING-RIGHT: 0px; BACKGROUND-COLOR: rgb(245,245,245)">
<span class="p_s_name" style="WIDTH: 122px; FLOAT: left; PADDING-LEFT: 9px; DISPLAY: inline">Capacity</span>
<span class="p_s_value" style="WIDTH: 343px; FLOAT: right; DISPLAY: inline; PADDING-RIGHT: 9px">{$product.Capacity}</span>
</li>
<!--{/if}-->
这样写试试
那怎么判断那个值有没有数据呢,并做隐藏
追答不是已经判断过了吗,有值才执行if里面的语句啊,没值就跳过了,现在不就是的吗
追问噢,多谢,进入误区
温馨提示:答案为网友推荐,仅供参考