每个人我都需要帮助来使用 jqxwidgets 填充组合框。当我从国家组合框中选择一个国家时,所选国家的城市将出现在城市组合框中。我的代码是:
<div id="country"></div>
<div id="city"></div>
<script>
$(document).ready(function () {
var country = ["AUE","Egypt","Saudi Arabia" ];
var city = ["Abu Dabi","Dubi","El Ain","Sharga", "Alex","Cairo","Daqhlia","Giza","Gharbia","Marsa Matroh","Qaliubia", "Dammam","Jeddah","Madina","Mecca","Ryadh"];
$("#country, #city").jqxComboBox({height: 40, dropDownHeight:'150px', theme: 'darkblue'});
$("#country").jqxComboBox({source: country,placeHolder:"Country"});
$("#city").jqxComboBox({source: city,placeHolder:"City"});
});
</script>