1. Introduction of documents:
<link href= "Js/multiselect/jquery-ui.css" rel= "stylesheet" type= "Text/css"/>
<link href= "Js/multiselect/jquery.multiselect.css" rel= "stylesheet" type= "Text/css"/>
<script type= "Text/javascript" src= "Js/multiselect/jquery-ui.js" ></script>
<script type= "Text/javascript" src= "Js/multiselect/jquery.multiselect.js" ></script>
2. I realize the function of the province, city, district, Street, (the street needs more choice)
When the Drop-down box is initialized, the list of streets with multiple selection boxes in different regions is automatically refreshed
Main JS Code:
function Inittowns (e) {
var areacode=$ ("#area_selt"). Val ();
if (AreaCode) {
$.post ("inittowns.html?method=" +areacode,function (data) {
multiselect.empty ();
For (index in data) {
opt = $ (' <option/> ', {
value:data[index].code,
text:data[index].name
}); C9/>opt.appendto (MultiSelect);
}
Multiselect.multiselect (' refresh ');
}, "json");
}
Description: Every time to get the data backstage: Mulitselect,empty () Empty the Drop-down box and then through the Refresh method to load the new data can be