省市区选择
<input type="text" name="city" class="form-ip" id="input-address" data-val="重庆/重庆市/武隆县" value="重庆重庆市武隆县"> <input type="hidden" name="province" id="province" value=""> <input type="hidden" name="city" id="city" value=""> <input type="hidden" name="county" id="county" value=""> <script src="static/js/area.js"></script> <script> $(function() { $("#input-address").address({'get':function(json) { $("#province").val(json.prov); $("#city").val(json.city); $("#county").val(json.district); }}) }); </script>