js城市树形控件
<td class="width-15 active"><label class="pull-right">省/市/区:</label></td>
<td class="width-35">
<div class=" input-group" style=" width: 100%;">
<form:input path="province" htmlEscape="false" class="" data-toggle="city-picker" style="height: 34px;"/>
</div>
</td>
form表单
<link href="../../../static/common/css/bootstrap.css" rel="stylesheet" />
<link href="../../../static/common/css/jquery.city.bootstrap.css" rel="stylesheet" />
<link href="../../../static/common/css/animate.min.css" rel="stylesheet" />
需要映入的css样式文件,根据自己包路径引入
<script src="../../../static/common/js/bootstrap.js"></script>
<script src="../../../static/common/js/jquery.city.js"></script>
需要引入的js文件
<script>
$(function () {
$('#province').jcity({
urlOrData: '../../../static/common/js/citydata.json',
animate: { showClass: 'animated flipInX', hideClass: 'animated flipOutX' },
onChoice: function (data) {
console.log(data);
}
});
});
</script>