我如何克隆下拉列表(组合框),与选择的选项?拷贝/克隆下拉列表在jQuery的选择的选项
jquery .clone方法不适用于firefox选定的选项。
我有不同的控制一个div。我必须复制整个div到一个变量像这样
var $orginalDiv = $('#myDiv');
var $clonedDiv = $orginalDiv.clone();
$clonedDiv.find('select').each(function() {
....Something do here for assigning selected options from original div ..
});
让我知道我们该怎么做,它必须在FireFox中工作。
你可能正在寻找这一个,[jquery克隆不复制选择dom属性](http://stackoverflow.com/questions/3776270/jquery-clone-doesnt-copy-select-dom-properties) – Reigel 2010-10-05 08:03:23
@Reigel这是为单一控制,但我需要多个下拉列表。我如何在问题代码中分配val? – Brij 2010-10-05 08:09:24