Knockoutを使用します。基本的に、利用可能な質問を返すJavaScriptビューモデルを作成します。
私にも同様の要件があり、次のことが機能しました。
http://jsfiddle.net/mbest/wfW97/
参照用のコードは次のとおりです。
function ViewModel() {
var self = this;
self.colors = ['red','orange','yellow','green','blue','indigo','violet'];
self.selections = [];
ko.utils.arrayForEach(self.colors, function() {
self.selections.push(ko.observable());
});
self.selfAndUnselectedColors = function(index) {
var selfColor = self.selections[index]();
return ko.utils.arrayFilter(self.colors, function(color) {
return color === selfColor || !ko.utils.arrayFirst(self.selections, function(sel) {
return color === sel();
});
});
}
}
ko.applyBindings(new ViewModel());
そしてHTML:
<div data-bind="repeat: colors.length">
<select data-bind="options: selfAndUnselectedColors($index), optionsCaption: 'select a color', value: selections[$index]"></select>
</div>