zoukankan      html  css  js  c++  java
  • tp三级联动

    <script type="text/javascript">
    $(document).ready(function(){
      $("#province").change(function(){
      var value=$("#province").val();
      //alert (value);
      htmlobj=$.ajax({url:"__PUBLIC__/php/city.php",async:false,data:
    {value:value}});
      $("#city").html(htmlobj.responseText);
    });
    }); 

    $(document).ready(function(){
      $("#city").change(function(){
      var value=$("#city").val();
      //alert (value);
      htmlobj=$.ajax({url:"__PUBLIC__/php/district.php",async:false,data:
    {value:value}});
      $("#district").html(htmlobj.responseText);
    });
    });
    </script>

    city
    district


    <?php
    header("Content-type: text/html; charset= utf-8");
    $con = mysql_connect("localhost","root","root");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }
    mysql_query("SET NAMES 'UTF8'");
    mysql_select_db("hn", $con);
    $result = mysql_query("SELECT * FROM xp_sys_city where ProvinceID = ".$_GET['value']);
    while($row = mysql_fetch_array($result))
    {
    echo "<option value='".$row['ID']."'>".$row['CityName']."</option>";
    }

    <script src="__PUBLIC__/bower_components/jquery/city_ajax.js"></script>

    city
    district

  • 相关阅读:
    Bundle Adjustment
    BFL ekf imu and odom
    RNN
    深度学习的数学(笔记)
    BP 神经网络
    PCA
    SVM
    KNN
    Kmeans
    决策树
  • 原文地址:https://www.cnblogs.com/hellowzd/p/4489432.html
Copyright © 2011-2022 走看看