I have a <select>. Using JavaScript, I need to get a specific <option> from the parameter list, and all I know is the value of the parameter. This option may or may not be selected.
Here's the catch: there are thousands of options, and I need to do this several hundred times in a loop. Right now, I am going through the "options" array and looking for the option I want. This is too slow (in the sense that on my very fast machine, the browser is blocked until I killed it in a few minutes).
Is there a faster way to do this? I will use browser-specific methods, but, of course, the DOM-standard method will be nice.
source share