后台多层筛选用户信息

要实现的效果是:先搜索出指定用户的数据,再用状态分出该用户指定提现状态的的数据。(原理,每次点击都是打开一个新的页面,只是提交的参数不同)

html页面:

<div>&nbsp;&nbsp;&nbsp;&nbsp;搜索:
    <span><input type='text' id='order'>&nbsp;&nbsp;&nbsp;<input type='button' value='用户ID|用户名|联系方式' onclick='s_order();'></span>
</div>
<script type="text/javascript">
    function s_order()
    {    
        var docurl = "{:U('Admin/Tx/index')}"+'&order='+$('#order').val();
        open(docurl,'_self');
    }
</script>

 

<script type="text/javascript">
$(document).ready(function(){
        $("#member").val("{$status}");
      $("#member option").click(function(){
          s=$(this).val();
        var url = window.location.search;
        if(url.indexOf('status')!=-1){
            var length1="&status=0".length;
            var tou= url.substring(0,url.indexOf('status')-1);
            var wei= url.substring(url.indexOf('status')+length1-1);
            if(s==""){
                window.location.href=window.location.pathname+tou+wei;
            }else{
                window.location.href=window.location.pathname+tou+wei+"&status="+s;
            }
        }else{
            if(s==""){
                window.location.href=window.location.href;
            }else{
                window.location.href=window.location.href+"&status="+s;
            }
        }
      });
    });
</script>

 

posted @ 2016-02-24 18:24  绿尘枫  阅读(227)  评论(0编辑  收藏  举报