/ Published in: JavaScript
This will remove the items in a select box/list box that have been selected.
Expand |
Embed | Plain Text
function remove_selected_items(listid){ var list = document.getElementById(listid); var items = list.options.length; for(var i = items-1; i >= 0; i--) { if(list.options[i].selected == true){ list.remove(i); } } }
You need to login to post a comment.
