1.使用location.href刷新页面
例如用location.href=”message”,其显示的方法也要用”message”命名,否则系统会自动去寻找统一控制类中的”message”方法,造成出错
2.用<volist>标签遍历多维数组
例子:
<table cellsaping="0" width="97%" height="80px" style="margin-left:10px;margin-top:20px;" >
<volist name="list" id="vo"><!--第一次遍历-->
<tr >
<td style="border-top:1px solid blue">
<font color="blue"> <{$vo.LMpeople}></font> 第<{$i}>楼
<div style="margin-bottom:20px;height:30px;width:50%"><{$vo.LMcontent}></div>
<{$vo.LMtime}><a href="javascript:void(0);" style="font-color:blue">回复</a><a href="javascript:void(0);" name="<{$vo.LMId}>" style="font-color:blue">删除</a>
<table cellsaping="0" width="50%" height="40px" style="margin-left:50px;margin-top:5px" style="border-top:1px solid blue">
<!--$vo.message是一个二维数组,第二次遍历,实现四维数组的遍历-->
<volist name="vo['message']" id="message">
<tr>
<td>
<font color="blue"><{$message.Rpeople}></font> <{$message.Rcontent}><br/>
<{$message.Rtime}><a href="javascript:void(0);" style="font-color:blue">回复</a>
<a href="javascript:void(0);" name="<{$message.RId}>" style="font-color:blue">删除</a><br/><br/>
</td>
</tr>
</volist>
</table>
<form action="__CONTROLLER/doReplay" method="post" style="margin-left:50px;margin-top:5px;display:none">
<textarea name="lmessage" rows="3" cols="48" ></textarea><br/>
<input type="submit" name="submit" value="发 表"/ style="font-size:10pt;margin-left:15px;margin-top:5px;background-color:#00BFFF;border-color:#00BFFF">
<input type="reset" name="reset" value="取 消"/ style="font-size:10pt;margin-left:15px;margin-top:5px;background-color:#00BFFF;border-width:0px">
</form>
</td>
</tr>
</volist>
</table>