zoukankan      html  css  js  c++  java
  • 菜单联动

    <td><div>品牌:</div></td>
    <td><s:select list="carBrandList" id="brand" name="condtionBizBean.brandId" onchange="brandchang(this)" headerKey="" headerValue="请选择" listKey="id" listValue="brandName" cssStyle=" 120px;" /></td>
    <td><div>车系:</div></td>
    <td>
    <select id="series" name="condtionBizBean.seriesId" onchange="serieschang(this)" style=" 120px;">
    <option selected="selected" value="">请选择</option>

    </select>
    </td>
    <td><div>车型:</div></td>
    <td><select id="carModel" name="condtionBizBean.carTypeId" style=" 120px;">
    <option selected="selected" value="">请选择</option>
    </slect>
    </td>


    function brandchang(s){
    var brandInnerId=$(s).val();
    var path = getRootPath();
    $.ajax({url:path+"/carBrandUtil/findSeries.do?brandInnerId="+brandInnerId,

    success:function(data){
    var obj=data.series;
    var n=obj.length;
    var htl="<option selected='selected' value=''>请选择</option>";
    $("#carModel").html(htl);
    for(var i=0;i<n;i++){
    htl=htl+"<option value=""+obj[i].id+"">"+obj[i].serisName+"</option>"
    }

    $("#series").html(htl);

    }
    });
    }
    function serieschang(s){
    var seriesInnerId=$(s).val();
    var path = getRootPath();
    $.ajax({url:path+"/carBrandUtil/findCarType.do?seriesInnerId="+seriesInnerId,

    success:function(data){
    var obj=data.type;
    var n=obj.length;
    var htl="<option selected='selected' value=''>请选择</option>";
    for(var i=0;i<n;i++){
    htl=htl+"<option value=""+obj[i].id+"">"+obj[i].simpleName+"</option>"
    }

    $("#carModel").html(htl);
    }
    });
    }

  • 相关阅读:
    [转]Angular4首页加载慢优化之路
    [转]angular 禁止缓存
    微服务之分布式跟踪系统(springboot+pinpoint)
    分布式追踪系统设计与实现
    QLExpress 规则引擎使用介绍
    几个常见规则引擎的简单介绍和演示
    大数据对账
    美团配送资金安全治理之对账体系建设
    美的支付-对账系统实现
    redis实现对账(集合比较)功能
  • 原文地址:https://www.cnblogs.com/xuehen/p/4686020.html
Copyright © 2011-2022 走看看