top list的使用

融合导航和显示数据页面。

载入数据Top页面:  


表单中指定target,直接载入表单内容,表单通过action,数据提交到后台进行处理,再渲染回表格数据。

<form action="./index.php?r=backweb/brand/brand" method="post" name="fm" id="fm" target="iframe1">


同个页面加入下面语句,直接载入数据:

 <iframe id="iframe1" name="iframe1" οnlοad="this.height=iframe1.document.body.scrollHeight+20" frameborder="0" marginheight="100" marginwidth="0" width="100%" scrolling="no" ></iframe>



在brand主页面载入表格数据及分页信息


 <div >
        		<form action="./index.php?r=backweb/brand/sort" method="post" id="f">
				<?php foreach ($infos as $v) {?>
				<input type="hidden" name="brand_id[]" value="<?php echo $v['brand_id']; ?>" id="h" />
				<?php }?>
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
                <tr>
                   <th width="80">编号</th>
                   <th width="80">品牌名</th>
                   <th width="200">品牌网站</th>
                   <th width="400">品牌介绍</th>
                   <th width="80">所属分类</th>
                   <th width="200">操作</th>
                   <th width="80">是否可用</th>
                   <th><input type="submit" name="send" value="排序" style="width:50px;height:25px;"  id="submit"  /></th>
                </tr>
         	<?php foreach ($infos as $v) {?>
         	<tr class="tr">
         		<td class="td_center"><?php echo $v[brand_id]; ?></td>
         		<td class="td_center"><?php echo $v['brand_name']; ?></td>
         		<td class="td_center"><a href="<?php echo $v['brand_url']; ?>" style="text-decoration:underline;" ><?php echo $v['brand_url']; ?></a></td>
         		<td  class="td_center"><?php echo $v['brand_info']; ?></td>
         		<td class="td_center"><a href="./index.php?r=backweb/brand/brand&category_id=<?php echo $v['category_id']; ?>"><?php echo $info[$v['category_id']]; ?></a></td>
         		<td class="td_center"><span><a href="./index.php?r=backweb/brand/brandupd&brand_id=<?php echo $v['brand_id']; ?>">修改</a>|<a href="./index.php?r=backweb/brand/branddel&brand_id=<?php echo $v['brand_id']; ?>">删除</a></span></td>
         		<td  class="td_center"  id="active" ><a href="./index.php?r=backweb/brand/active&brand_id=<?php echo $v['brand_id']; ?>&active_id=<?php echo $v['active'];?>"><?php echo $active[$v['active']]; ?></a></td>
         		<td class="td_center" ><input type="text" name="sort[]" value="<?php echo $v['brand_sort']; ?>" style="width:40px;text-align:center;"  /></td></tr>
         	</tr>				
			<?php }?>
              </table>
			</form>

			<div class="page" style="text-align: center;margin-top: 5px">
                <div class="pagination">
                  <ul>
                      <li class="first-child"><?php echo $page_list[0];?></li>
                      <li class="disabled" ><?php echo $page_list[1];?></li>
                      <li class="active"><?php echo $page_list[2];?></li>
                      <li><?php echo $page_list[3];?></li>
                      <li><?php echo $page_list[4];?></li>
                  </ul>
			</div>
			</div>
        </div>



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值