链接:https://pan.baidu.com/s/1NE_EO5_xGvR-y-lboYap7g
提取码:h00e
效果展示:
解决:
动态赋值:
注意:在执行赋值之前,必须执行reset和destroy操作
<div style="position: relative;"><!-- container -->
<input id="city-picker1" readonly type="text">
<input id="set" type="button" value="赋值"/>
</div>
<script type="text/javascript">
$(function(){
$("#city-picker1").citypicker();
$("#set").click(function() {
$("#city-picker1").citypicker("reset");
$("#city-picker1").citypicker("destroy");
$("#city-picker1").citypicker({
province: '江苏省',
city: '宿迁市',
district: '沭阳县'
});
});
});
</script>