复合条件语句不起作用。我的代码出了什么问题?
{{if(parseInt(address)> = 6001&& parseInt(address)< = 31999)||
(parseInt(address)> = 35004&& parseInt(address)< = 38589)}}
< span>这里的一些文字....< / span>
< span>这里的另一些文字......< / span>
{{/ if}}
{{if (parseInt(address) >= 6001 && parseInt(address) <= 31999) ||
(parseInt(address) >= 35004 && parseInt(address) <= 38589) }}
<span>Some text here...</span>;
<span>Another some text here...</span>;
{{/if}}
答案 0 :(得分:0)
我不知道这是什么语言,但你可能在开头就错过了一些语言:
修改强>
{{if((parseInt(address) >= 6001 && parseInt(address) <= 31999) ||
(parseInt(address) >= 35004 && parseInt(address) <= 38589)) }}
<span>Some text here....</span>
<span>Another some text here...</span>
{{/if}}
以下是此代码的缩进版本,以便您可以看到需要的是什么(请注意这种格式可能与您的语言不兼容):
{{
if(
(parseInt(address) >= 6001 && parseInt(address) <= 31999 )
||
(parseInt(address) >= 35004 && parseInt(address) <= 38589)
)
}}
<span>Some text here....</span>
<span>Another some text here...</span>
{{
/if
}}
||
两侧的2个条件未正确封闭。