zoukankan      html  css  js  c++  java
  • 商品筛选

      <style>
       .in,.in a{background: #FA8D00;color: #fff;border-radius: 4px;}
       .in a:hover{color: #fff}
      </style>
    <script>
    $(function(){
          $("#user_button a:first").attr("class", "button button-flat-caution button-tiny");
         $("#user_button a").mouseover(function(){
             $("#user_button a").attr("class", "button button-flat");
             $(this).attr("class", "button button-flat-caution button-tiny");
         });
          <?php
             if($_GET){
               echo 'var obj='.json_encode($_GET).';';
             }
          ?>
         if(typeof(obj)!='undefined'){
            // alert(obj);
             for(k in obj){
               $("#"+k).val(obj[k]);
               $("a["+k+"="+obj[k]+"]").parent().addClass("gonggong").siblings().removeClass("gonggong");
             }
         }
    }); 
    </script>
        <script>
            function Filter(a,b){
              var $ = function(e){return document.getElementById(e);}
              var ipts = $('filterForm').getElementsByTagName('input'),result=[];
              for(var i=0,l=ipts.length;i<l;i++){
              if(ipts[i].getAttribute('to')=='filter'){
              result.push(ipts[i]);
              }
              }
              if($(a)){
              $(a).value = b;
              for(var j=0,len=result.length;j<len;j++){
                if(result[j].value=='' || result[j].value=='0'){
                result[j].parentNode.removeChild(result[j]);
                }
              }
                document.forms['filterForm'].submit();
              }
              return false;
              } 
        </script>
    <css href="__ROOT__/Style/H/css/shop.css"/>
    <div style="background-color: #fff;"><include file="Public:_header_main" /></div>
    <div class="jf_shop">
        <div id="conter">
            <div id="cont">
                <div id="saixuanshangpin">
                    <form id="filterForm" name="form1" method="get" action="__URL__/index">
                      <input id="pid" type="hidden" value="" name="pid" to="filter">
                      <input id="theme" type="hidden" value="" name="theme" to="filter">
                        <div class="fenlei">
                        <div class="zhong"><STRONG>商品分类;</STRONG></div>
                        <div id="fenlei_style">
                            <ul>
                                <li class="gonggong"><a pid="0" href="javascript:Filter('pid','0');">全部</a></li>
                                <volist name="fenlei" id="vo" key="k">
                                    <li><a pid={$k} href="javascript:Filter('pid',{$k});">{$vo.fenlei}</a></li>
                                </volist>
                            </ul>
                        </div>
                    </div>
                    <div class="fanwei">
                        <div class="zhong"><STRONG>积分范围;</STRONG></div>
                        <div id="fenlei_f">
                            <ul>
                                <li class="gonggong"><a href="javascript:Filter('theme','0');">全部</a></li>
                                        <volist name="fanwei" id="vo" key="k">
                                    <li><a theme={$k} href="javascript:Filter('theme',{$k});">{$vo.fanwei}</a></li>
                                </volist>
                            </ul>
                        </div>
                    </div>
                    </form>
  • 相关阅读:
    bzoj 4451 : [Cerc2015]Frightful Formula FFT
    bzoj 3928: [Cerc2014] Outer space invaders
    HDU 5306 线段树
    bzoj 1914: [Usaco2010 OPen]Triangle Counting 数三角形
    bzoj 4519: [Cqoi2016]不同的最小割 最小割树
    bzoj : 4504: K个串 区间修改主席树
    bzoj 4332:JSOI2012 分零食
    bzoj 2595 : [Wc2008]游览计划
    poj 3683 Priest John's Busiest Day
    bzoj 1823: [JSOI2010]满汉全席 && bzoj 2199 : [Usaco2011 Jan]奶牛议会 2-sat
  • 原文地址:https://www.cnblogs.com/laohan110/p/4045940.html
Copyright © 2011-2022 走看看