javascript 对ListBox的增 删
假设有2个ListBox,ID分别为lbLeft,lbRight
选中lbLeft里的项添加到lbRight里:
function add()
{
var left;
var right;
left = document.getElementById("lbLeft");
right = document.getElementById("lbRight");
for(var i=0;ileft.length;i++)
{
if(left.options[i].selected)
{
//判断该项是否已经存在
for(j=0;jright.length;j++)
{
...[ 查看全文 ]