yasmena 0 Light Poster

i need to add an option from list1 to list2 when the user clicks on ADD to List button
but sth is wrong with my code it's not working

function AddItem()
{


var opt = document.getElementById("List1").selectedIndex;


document.getElementById("List2").options.add(opt);

}
can anyone tell me whats wrong ??!!!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.