下拉select选项多级联动实例。
1. 引入JS,
$('#cnMap').cxSelect({
url: 'js/cityData.min.json',//url: 'js/cityData.min.json',selects: ['province','city','region'],nodata: 'none'
});
$('#globalMap').cxSelect({
url: 'js/globalData.min.json',selects: ['country','state',nodata: 'none'
});
实例源码:
-->
UnionSelect
<div class="form-group" id="cnMap">
<label for="firstname" class="col-sm-3 control-label">全国 (省、市、县三级;包括提交表单的验证。)
<div class="col-sm-3">
<select name="province" class="province form-control" disabled="disabled" data-first-title="选择省份">
<label for="firstname" class="col-sm-3 control-label">全国 (省、市、县三级;包括提交表单的验证。)
<div class="col-sm-3">
<select name="province" class="province form-control" disabled="disabled" data-first-title="选择省份">
<div class="form-group" id="globalMap">
<label for="firstname" class="col-sm-4 control-label">全球 (国、省、市、县三级;未做表单验证。)
<div class="col-sm-2">
<select name="country" class="country form-control" disabled="disabled" data-first-title="选择国家">