Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript select change selected

const options = Array.from(select.options);
options.forEach((option, i) => {
  if (option.value === use_id) select.selectedIndex = i;
});
Source by alvarotrigo.com #
 
PREVIOUS NEXT
Tagged: #javascript #select #change #selected
ADD COMMENT
Topic
Name
2+5 =