Cascading DropDown删除上一个选定的

我想在html中有7个下拉框。 他们都会填充相同的数据。 我想要做的是当第一个下拉列表被选中时,它将从下一个下拉列表中删除所选项目。 所以,如果你有数字:A,B,C,D,E,F,G,H,我在一个下拉列表中,如果我在第一个下拉列表中选择B,那么在下一个下拉列表中它应该只显示A,C,D ,E,F,G,H,I等最多7个下拉菜单。 我不知道在JavaScript或JQuery中处理这个问题的最佳方法是什么。 感谢您的帮助。

 Selected Options: 
Diagnosis: -
<!---
---> Primary : #DCheck.cDescription#   

Secondary: #DCheck.cDescription#   

Third   : #DCheck.cDescription#   

Fourth : #DCheck.cDescription#   

Fifth   : #DCheck.cDescription#   

Sixth   : #DCheck.cDescription#   

Seventh : #DCheck.cDescription#   

http://jsfiddle.net/iambriansreed/AyxSE/

这适用于无限select标签。

jQuery的

 $('#select-group select').change(function(){ var values = []; $('#select-group select').each(function(){ if(this.value.length > 0) values.push(this.value); }); $('#select-group select optgroup').each(function(){ $(this).after('').remove(); }); $('#select-group select option').each(function(){ if($.inArray(this.value, values) > -1 && !this.selected) $(this).after('').remove(); }); });​ 

HTML