2013-05-02 125 views
0

首先在此先感谢。 在我的jsp页面中,我有两个标签。在运行时,我想删除多个选定的选项标签并将这些标签插入另一个标签。 whith下面的代码我已经完成添加并删除一个选项标记。JQuery:添加现有<option>标签<select>标签

$("input[type=button]").removeAttr("disabled"); 
    var option = $('#availableExpert option:selected'); 
    $('#availableExpert option:selected').remove(); 
    $('#assignedExpert').append('<option value='+option.val()+'>'+option.text()+'</option>'); 

这是怎么做的多选择选项标签?

回答

1

使用

$("input[type=button]").prop("disabled", false); 
$('#availableExpert option:selected').detach().appendTo('#assignedExpert'); 
+0

谢谢'阿伦先生P Johny'求助 – 2013-05-02 07:31:05