安装
<script src =“js/ jquery.js”> </ script> <! - jQuery是必需的 - >
<script src =“js/ city-picker.data.js”> </ script>
<script src =“js/ city-picker.js”> </ script>
使用data-toggle="city-picker"属性初始化
<div data-toggle =“city-picker”>
<input readonly type =“text”data-toggle =“city-picker”>
</div>
自定义省/市/区
<div style =“position:relative;”> <! - container - >
<input readonly type =“text”data-toggle =“city-picker”value =“北京市/北京市/海淀区”>
</div>
区域必须存在于city-picker.data.js文件中!
用$.fn.citypicker方法初始化
<div style =“position:relative;”> <! - container - >
<input id =“city-picker1”readonly type =“text”>
</ div>
$("#city-picker1").citypicker();