0

我有一个名为雇员的表。我正在将此表中的数据提取到 5 个下拉列表中,其中包含字段 EmpNo、Unit、Location、Onsite/Offshore 等,当我在任何下拉列表中选择一个值时,所有下拉列表中的值都必须更改. 任何人都可以帮助我如何实现这一点?

4

1 回答 1

0

Server side solution

There is a SelectedIndexChanged event for the dropdown control. In that event, you need to reset all other dropdowns or reload some other data.

Client side solution (with jQuery)

Listen to the change event of the first dropdown and clear the other dropdown content in that event.

$(function(){
  $("#IDofFirstDropDown").change(function(e){
    $("#IDofSecond").html("");
  });
});
于 2013-10-06T13:36:18.150 回答