项目作者: xiaosefengyun

项目描述 :
This is an updated version of LArea, from the national administrative division of China.
高级语言: JavaScript
项目地址: git://github.com/xiaosefengyun/Select-Citys.git
创建时间: 2017-07-28T01:28:26Z
项目社区:https://github.com/xiaosefengyun/Select-Citys

开源协议:

下载


select-city

This is an updated version of LArea, from the national administrative division of China.


How to use

import css and javascript

  1. <link rel="stylesheet" href="css/LArea.css">
  2. <script src="js/LAreaData1.js"></script>
  3. <script src="js/LArea.js"></script>

Initialize with the following code

  1. var area1 = new LArea();
  2. area1.init({
  3. 'trigger': '#demo1', //Triggers the text box that selects the control, and selects the finished name attribute to output to that location
  4. 'valueTo': '#value1', //Select the after id attribute to output to this location
  5. 'keys': {
  6. id: 'id',
  7. name: 'name'
  8. }, //The correlation field id of the bound data source corresponds to valueTo's value property output name corresponding to trigger's value attribute output
  9. 'type': 1, //Data source type
  10. 'data': LAreaData //Data source
  11. });
  12. area1.value=[18,2,2];//Control the initial location, note: this method does not affect the value of the input