错误写法:
<div class="hflz"> <volist name="arr1" id="vo"> <div class="lz"> <div class="name">{$vo.name}</div> <div class="cont">{$vo.cont}</div> <a href="javascript:void(0)" class="hf" title="{$vo.id}">回复</a> <a href="javascript:void(0)" class="hf1">收起回复</a> </div> <div class="hfcz"> <volist name="arr2" id="vo1" key="num"> <if condition="$vo.id eq $vo1.czid"> <div>{$vo1.cont}</div> </if> </volist> </div> <div class="re"> <form action="" method="post"> <textarea name="huifu"></textarea> <input type="hidden" value="{$vo.id}" name="lz"> <label><a href="javascript:void(0)" class="fabiao1">发表</a></label> </form> </div> </volist> </div> <!--回复后显示回复内容的容器-->
正确写法:
<div class="hflz"> <volist name="arr1" id="vo"> <div class="lz"> <div class="name">{$vo.name}</div> <div class="cont">{$vo.cont}</div> <a href="javascript:void(0)" class="hf" title="{$vo.id}">回复</a> <a href="javascript:void(0)" class="hf1">收起回复</a> </div> <div class="hfcz"> <volist name="arr2" id="vo1" key="num"> <if condition="$vo.id eq $vo1['czid']"> <!--修改此处--> <div>{$vo1.cont}</div> </if> </volist> </div> <div class="re"> <form action="" method="post"> <textarea name="huifu"></textarea> <input type="hidden" value="{$vo.id}" name="lz"> <label><a href="javascript:void(0)" class="fabiao1">发表</a></label> </form> </div> </volist> </div> <!--回复后显示回复内容的容器-->