省市区级联JS控件

下载地址https://files.cnblogs.com/bin-pureLife/%E5%B0%8F%E5%9B%BE%E6%A0%87.zip

function update(province,city,county){
    $("#s_province option").each(function(){
        if($(this).val()==province){
            $(this).attr('selected',true)
            change(1);
        }
    });
    $("#s_city option").each(function(){
        if($(this).val()==city){
            $(this).attr('selected',true)
            change(2);
        }
    });
    $("#s_county option").each(function(){
        if($(this).val()==county){
            $(this).attr('selected',true)
        }
    });
}

三个参数分别为,你之前保存的 省 市  区。

 

相关文章:

  • 2022-01-13
  • 2022-12-23
  • 2021-12-04
  • 2021-07-06
  • 2021-10-29
  • 2021-06-30
  • 2022-12-23
猜你喜欢
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案