• 页面省市区级联加载


    <tr>
    <td align="right">所在省:</td>
    <td>
    <select id="unitProvince" name="unitProvince" onchange="selectCompanyAddress2();selectCompanyAddress3();">
    <option value=" " selected="selected">请选择所在省份</option>
    </select>
    </td>
    <td align="right" valign="middle">所在市:</td>
    <td>
    <select id="unitCity" name="unitCity" onchange="selectCompanyAddress3()">
    </select>
    </td>
    </tr>
    <tr>
    <td align="right" >所在区:</td>
    <td>
    <select id="unitStreat" name="unitStreat">
    </select>
    </td>
    <td align="right">详细地址:</td>
    <td>
    <input type="text" id="unitAddress" name="unitAddress">
    </td>
    </tr>

    //js代码================

    function selectCompanyAddress1(){
    var url='<%=basePath%>xyData/dict/LoadChildSellect.do?fid=';
    HydUtilLoadChildSellect(url,$("#unitProvince"),"99996","");
    }
    function selectCompanyAddress2(){
    var url='<%=basePath%>xyData/dict/LoadChildSellect.do?fid=';
    HydUtilLoadChildSellect(url,$("#unitCity"),"99996",$("#unitProvince").val());
    }
    function selectCompanyAddress3(){
    var url='<%=basePath%>xyData/dict/LoadChildSellect.do?fid=';
    if(null!=$("#unitProvince").val() && ""!=$("#unitProvince").val()) {

    //查询字典获取内容
    HydUtilLoadChildSellect(url, $("#unitStreat"), "99996", $("#unitCity").val());
    }
    }

  • 相关阅读:
    layui下拉框数据过万渲染渲染问题解决方案
    eclipse debug启动时tomcat报错
    用eclipse的同一个tomcat启动两个javaweb项目
    Json
    @ResponseBody
    SpringMVC Controller 介绍
    tianmao项目的学习笔记
    Thymeleaf入门
    Thymeleaf th:include,th:replace使用
    X 在Windows上使用orakill结束oracle会话的线程
  • 原文地址:https://www.cnblogs.com/xianz666/p/12182458.html
Copyright © 2020-2023  润新知