thikphp杂记

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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值