通过修改system中的pagination.php,给每个<a>都增加了class="pagination".

view页面

                  <div class="pull-left">
<script src="http://bi.xiaoyou-game.com/static/js/mydate.js"></script> 账号ID
<input type="text" name="accountid" value="<{$accountid}>" placeholder='所有账号' id="accountid">
&nbsp;&nbsp;&nbsp;&nbsp;
渠道名称
<select name="channelname" id="channelname">
<option value='' <{if $channelname == ''}>selected <{/if}>>全部</option>
<option value='360' <{if $channelname == '360'}>selected <{/if}>>360</option>
<option value='jiuyou' <{if $channelname == 'jiuyou'}>selected <{/if}>>jiuyou</option>
<option value='baidu' <{if $channelname == 'baidu'}>selected <{/if}>>baidu</option>
<option value='qq' <{if $channelname == 'qq'}>selected <{/if}>>qq</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;
是否在被使用
<select name="isuse" id="isuse">
<option value='' <{if $isuse === ''}>selected <{/if}>>全部</option>
<option value='1' <{if $isuse == '1'}>selected <{/if}>>是</option>
<option value='0' <{if $isuse === '0'}>selected <{/if}>>否</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size:20px" ><{$links}></span>
</div>

view页面js代码

<script>
$(function(){
$(".pagination").click(function(){
var url = $(this).attr("href");
var accountid = $("#accountid").val();
var channelname = $("#channelname").val();
var isuse = $("#isuse").val();
url = url + '?accountid=' + accountid + '&channelname=' + channelname + '&isuse=' +isuse;
$(this).attr("href",url);
})
})
</script>

通过给href增加参数,带到后台PHP,GET接收。

PHP CI分页类带多个参数的更多相关文章

  1. codeigniter分页类传多个参数(转)

    http://example.com/index.php/控制器/方法名/页面的偏移值 页面的偏移值必须是方法名后第一个参数,否者分页类不能判断当前是哪一页,而用ci的分页类进行页面跳转时他是把偏移值 ...

  2. CI 分页类的使用

    分页本身很简单,无非就是一个 [limit $offset, $length] 的过程. $length 是每页显示的数据量,这个是固定的.要确定的就只有 $offset了. 在CI中的分页类同样要依 ...

  3. 一个简单的CI分页类

    [php] view plaincopy <span style="font-size:16px;">/** * * 关于 页码有效性的判断需要加在 控制器中判断,即当 ...

  4. Ci 分页类的所有属性总结

    //#######################自定义分页 $config['uri_segment'] = 3;//分页方法自动测定你 URI 的哪个部分包含页数 $config['num_lin ...

  5. Yii2中自带分页类实现分页

    1.首先写控制器层 先引用pagination类 use yii\data\Pagination; 写自己的方法: function actionFenye(){        $data = Fie ...

  6. Ci 自己的分页类【原创】

    这里是自己手写的一个CI分页类的实现 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** ...

  7. 二十八、CI框架之自己写分页类,符合CI的路径规范

    一.参照了CSDN上某个前辈写的一个CI分页类,自己删删改改仿写了一个类似的分页类,代码如下: 二.我们在模型里面写2个数据查询的函数,一个用于查询数据数量,一个用于查询出具体数据 三.我们在控制器里 ...

  8. CI分页,搜索之后翻页不能用问题

     最近在学习用php的CI框架写一个自己的CMS,遇到了些问题.其中一个就是CI分页的时候,我的URL带有其他参数,才能查出我想要的数据.于是我翻遍了谷歌度娘,终于找到了解决办法,和我想的差不多,就贴 ...

  9. ***CI分页:为CodeIgniter写的分页类

    ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 ...

随机推荐

  1. How to decide on the correct number of clusters?

    Determining the number of clusters/segments in hierarchical clustering/segmentation algorithms 由于uni ...

  2. 5月5日 while、do{}while

    while .do{}while 一.while的死循环 while (1 == 1)//只要表达式里是true,就是死循环 { //循环内容 } 二.do{}while 不管while是否满足,首先 ...

  3. ASP.NET Web API中的依赖注入

    什么是依赖注入 依赖,就是一个对象需要的另一个对象,比如说,这是我们通常定义的一个用来处理数据访问的存储,让我们用一个例子来解释,首先,定义一个领域模型如下: namespace Pattern.DI ...

  4. 读流testDemo

    import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.I ...

  5. mysql 无法远程访问(授权也没办法,确切的说是因为只绑定了127IP)

    默认状况下,出于安全考虑,mysql数据库屏蔽了远程访问功能. 然而在许多状况下,你需要在家或者从web程序去访问远端数据库服务器,这就相当麻烦了. 第一步: 激活网络设置你需要编辑mysql配置文件 ...

  6. 如何对ConnectionString进行加密解码?

    这个就不说了就是一个类 public static class EncryptionConfig { /* 加密配置节点 * Response.Write(EncryptionConfig.Encry ...

  7. linux-网卡故障

    Linux 网络问题解决思路 1.查看 /etc/sysconfig/network-script/ 查看eth0和eth1的配置是否正确 2.查看 /etc/modual.conf 的配置模块是否正 ...

  8. 搜索功能demo

    代码如下: <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edg ...

  9. [css3]搜索框focus时变长

    结构: <form class="demo-a">    <input placeholder="Search" type="sea ...

  10. c++普通高精除单精

    //没有在网上测试 //手测几组无误 //如有错误,还望指出,不胜感激. #include<cstdio>#include<cstring>int a1[600],a2,a4[ ...