【发布时间】:2013-04-10 14:23:58
【问题描述】:
大家好,我的页面中有两个组合框,我正在使用 selected() jquery 库。 现在我想做的是将文本从 combo1 交换到 combo2 。 我已经尝试过这样的事情。
var startint = $("#StartLocations").attr("selectedIndex");
var endint = $("#EndLocations").attr("selectedIndex");
$("#EndLocations").attr("selectedIndex", startint);
$("#StartLocations").attr("selectedIndex", endint);
$('#StartLocations').trigger("liszt:updated");
其中结束位置和开始位置是组合框的名称。 有什么想法可以实现吗?
【问题讨论】:
标签: jquery jquery-chosen