Answers for "Remove values from select list based on condition"

PHP
0

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);
}
Posted by: Guest on March-26-2021

Code answers related to "Remove values from select list based on condition"

Browse Popular Code Answers by Language