【发布时间】:2014-02-14 06:48:59
【问题描述】:
由于回发问题,我正试图摆脱服务器端控制。我想要两个从数据库中填充的选择框。当页面加载时,我将拥有一个已经从数据库中预填充的组合框:
<select ID="cboCustomers">
<option value="0">--Select a Sold-to customer--</option>
<option value="1">Customer1</option>
<option value="2">Customer2</option>
<option value="3">Customer3</option>
<option value="4">Customer4</option>
</select>
<select ID="cboShipTo">
<option value="0">--Select a Ship-to customer--</option>
</select>
The first dropdown should have autocomplete enabled and when a value is selected, it should use AJAX to populate the second drop down list with Ship-to customers that are available for the selected Sold-to customers.我有一个对象,它将接受参数并返回适当的数据。我的问题是如何完成上述任务。您能否提供一些示例代码或 jsFiddle 来满足我的要求?提前感谢您的帮助!
【问题讨论】:
标签: javascript jquery html asp.net ajax