Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Remove values from select list based on condition

var selectobject = document.getElementById("mySelect");
for (var i=0; i<selectobject.length; i++) {
    if (selectobject.options[i].value == 'A')
        selectobject.remove(i);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Remove #values #select #list #based #condition
ADD COMMENT
Topic
Name
4+3 =