selectCity.html 1.41 KB

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />


</head>
<body>
<div id="cityBox"></div>
<div id="cityBox1"></div>
<div id="cityBox2"></div>
</body>
</html>

<script src="http://static.diligrp.com/static/ace1.3/assets/js/jquery.min.js"></script>

<script type="text/javascript" src="selectCity.js"></script>

<script type="text/javascript">
    var config = {
        box: "#cityBox"
        , names: {
            province : "obj.enterprise.province"
            , city: "obj.enterprise.city"
            , county: "obj.enterprise.county"
            , text: "obj.address"
        }
        ,vals: [
            151, 3001, 1510103
        ]
        ,val: 1510103
    }

    var sCity = $.selectCity(config);

    var config = {
        names: {
            province : "obj.enterprise.province"
            , city: "obj.enterprise.city"
            , county: "obj.enterprise.county"
            , text: "obj.address"
        }
        ,vals: [
            151, 3001, 1510103
        ]
    }
    $("#cityBox1").selectCity(config);

//    var config2 = {
//        box: "#cityBox2"
//        , names: {
//            province : "obj.enterprise.province"
//            , city: "obj.enterprise.city"
//            , county: "obj.enterprise.county"
//            , text: "obj.address"
//        }
//        ,vals: [
//            151, 3001, 1510103
//        ]
//    }
//    $("#cityBox2").selectCity(config2);
</script>