<div spry:region="ds1" spry:repeatchildren="ds1">
<b spry:if=" '{title}'!='' ">
<!-- this is the first if -->
<a href="#" spry:if=" '{author}'!='' ">{author}
<!-- this is the second if -->
</a>
</b>
</div>我想知道有没有像这样简单的方法
if(x==y && i>j) 在……里面
<b>spry</b> 区域。我在spry文档(labs.adobe.com/technologies/spry/)中找不到任何信息
发布于 2010-05-11 20:43:32
Javascript属性内部的语法是Javascript,因此您可以使用&&
<b spry:if="'{title}' != '' && '{author}' != ''">
<!-- ... -->
</b>发布于 2010-07-28 19:37:19
此外,您也可以改为调用函数
spry:if="myFunc();"在你的函数中返回布尔值作为结果
function myfunc()
{
//do somethings ;
if(...)
return true;
else
return false;
}发布于 2013-06-09 03:43:30
通常我喜欢这样
<div spry:region="ds1" spry:repeatchildren="ds1">
<b spry:if=" '{ds1::title}'!='' && '{ds1::author}'!=''">
<a href="#">{author}</a>
</b>
</div>https://stackoverflow.com/questions/178601
复制相似问题