• 分类界面 大分类小分类


    <div class="v27 hide  ">
    <div class="v28">
    <div class="v29">
    <div class="v32">大类 :</div>
    <div class="v33">
    <input type="hidden" value="" class="dtype demo" id="dtype">
    <input type="hidden" value="" class="mtype demo" id="mtype">
    <input type="hidden" value="" class="biao demo" id="biao">
    <?php foreach($maxtype as $k=>$vo){ if($vo['id']==$pid){ ?>
    <a href="#" id="<?php echo $vo['id']?>" cid="{$vo.id}" style="color:rgb(69, 156, 154);" class="test">
    <?php }else{ ?>
    <a href="#" id="{$vo.id}" cid="{$vo.id}" style="color: rgba(0, 0, 0, 0.647058823529412);"
    class="test">
    <?php } ?>
    <div class=" a1 " style="margin-left: 3rem;;">{$vo.name}</div>
    </a>
    <?php }?>
    </div>
    </div>
    <div class="v29">
    <div class="v32">小类 :</div>
    <div class="v33" id="min">


    <volist name="mintype" id='vvo'>
    <?php if($vvo['id']==$sid){?>
    <a href="#" xid="{$vvo.id}" cid="{$vo.id}" style="color:rgb(69, 156, 154);" class="test2">
    <?php }else{ ?>
    <a href="#" xid="{$vvo.id}" cid="{$vvo.id}" style="color: rgba(0, 0, 0, 0.647058823529412);"
    class="test2">
    <?php } ?>
    <div class="mintype" style="margin-left: 3rem;">{$vvo.name}</div>
    </a>

    </volist>
    </div>
    </div>
    <div class="v29">
    <div class="v32">标准 :</div>
    <div class="v33 " id="main">
    <volist name="standard" id='vv'>
    <a href="#" class="test3" >
    <div class="zhun pt" bid="{$vv.id}" style="margin-left: 3rem;">
    {$vv.standard}
    </div>
    </a>
    </volist>

    </div>
    </div>
    </div>





    script:
    $(document).on('click', ".test", function () {
    id = $(this).attr('id');

    $(".test").css('color', 'rgba(0, 0, 0, 0.647058823529412)')
    $(this).css('color', '#459c9a')

    // $("."+id).addClass("active1")
    // $(".a1").removeClass("v34")
    maxid = $('.dtype').val(id);
    mtype = document.getElementById("mtype").value;
    biao = document.getElementById("biao").value;
    $("#mtype").val("");
    $("#biao").val("");

    $.ajax({
    url: "min",
    type: "post",
    dataType: "json",
    data: {
    id: id,

    },
    success: function (data) {

    str = '';
    $.each(data, function (k, v) {
    str += '<a href="#" val="a2"><div class="mintype " id="' + v.id + '" style="margin-left: 2rem;color: rgba(0, 0, 0, 0.647058823529412);"><span>' + v.name + '</span></div></a>'

    });
    $("#min").html(str);

    }
    })
    })


    $(document).on('click', '.mintype', function () {
    var min_id = $(this).attr('id')
    minid = $('.mtype').val(min_id);
    $(".mintype").css('color', 'rgba(0, 0, 0, 0.647058823529412)')
    $(this).css('color', '#459c9a')
    })


  • 相关阅读:
    常见的HTTP状态码(HTTP Status Code)说明
    Java基本数据类型和Integer缓存机制
    面向对象的三大基本特征和五大基本原则
    工程变更(ENGINEERING CHANGE)
    反射
    Redis学习手册(开篇)
    MVC,SSM与三层架构的构成及相互关系
    Java框架篇---Mybatis 入门
    java三大框架介绍
    WEB前端JS与UI框架
  • 原文地址:https://www.cnblogs.com/maohongli/p/12841405.html
Copyright © 2020-2023  润新知