Here is a useful function to generate a <select> element display.

I have also included a shuffle function to allow the options presented
to be shown in a random order for a matching quiz script.

Code:
Array.prototype.shuffle = function() {
  var i = this.length, j, temp;
  while ( --i ) {
    j = Math.floor( Math.random() * (i - 1) );
    temp = this[i]; this[i] = this[j]; this[j] = temp;
  }
}

Array.prototype.Populate = function(IDS,txtFld,valFld,pick) {
  var selElem = document.getElementById(IDS);
// following optional if 1st option is to be a constant
//  selElem.options.length = 0;  selElem.options[selElem.options.length] = new Option('Select','');
  for (var i=0; i<this.length; i++) {
    tmp = this[i].split(',');
    selElem.options[selElem.options.length] = new Option(tmp[txtFld],tmp[valFld]);
// to save all values for each option use:  ,this[i]);  instead of  ,tmp[valFld]);
  }
  if (pick !== undefined) { selElem.selectedIndex = pick; }
}
To show how they could be used, see following example:
You can have a variable number of SBox elements.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title> Select Box Matches </title>
<style type="text/css">
 #SBoxM0 { margin-right:50px; }
 #MultDDbtn { margin-left:225px; }
</style>
</head>
<body>
<h3> Match numbers<br>with language</h3>

<select id="SBoxM0" size="11" disabled> <option value=",,,,">-Number-</option> </select>

<select id="SBoxM1" size="11"> <option value="">-English-</option> </select>
<select id="SBoxM2" size="11"> <option value="">-Espanol-</option> </select>
<select id="SBoxM3" size="11"> <option value="">-French-</option> </select>
<select id="SBoxM4" size="11"> <option value="">-German-</option> </select>
<select id="SBoxM5" size="11"> <option value="">-Dutch-</option> </select>

<p> <button id="MultNext" onClick="document.getElementById('SBoxM0').selectedIndex++")">Next</button>
    <button id="MultDDbtn" onClick="checkAnswers()">Check Answers</button>

<script type="text/javascript">

Array.prototype.shuffle = function() {
  var i = this.length, j, temp;
  while ( --i ) {
    j = Math.floor( Math.random() * (i - 1) );
    temp = this[i]; this[i] = this[j]; this[j] = temp;
  }
}

Array.prototype.Populate = function(IDS,txtFld,valFld,pick) {
  var selElem = document.getElementById(IDS);
//  selElem.options.length = 0;  selElem.options[selElem.options.length] = new Option('Select','');
  for (var i=0; i<this.length; i++) {
    tmp = this[i].split(',');
    selElem.options[selElem.options.length] = new Option(tmp[txtFld],tmp[valFld]);
// to save all values for each option use:  ,this[i]);  instead of  ,tmp[valFld]);
  }
  if (pick !== undefined) { selElem.selectedIndex = pick; }
} 

function getSBoxes() {
  var tarr = [];
  for (var i=0; i<arguments.length; i++) {
    tarr.push(document.getElementById(arguments[i]).value);
  } return tarr.join();
}
function checkAnswers() {
  var resp = getSBoxes('SBoxM1','SBoxM2','SBoxM3','SBoxM4','SBoxM5').split(',');
  var correct = document.getElementById('SBoxM0').value;
  var score = 0;
  for (var i=0; i<resp.length; i++) { if (resp[i] == correct) { score++; } }
  alert( (score/resp.length*100).toFixed(0)+'%' );
}

// Format of matching quiz array
// 'ans,English,Spanish,French,German,Dutch',
var Matches = [
  '0,Zero,Zero,Zero,Null,Nul',
  '1,One,Uno,Un,Eins,Een', 
  '2,Two,Dos,Deux,Zwel,Twee',
  '3,Three,Tres,Trois,Drei,Drie',
  '4,Four,Quattro,Quatre,Vier,View',
  '5,Five,Cinco,Cing,Funf,Vijf',
  '6,Six,Seis,Six,Sechs,Zes',
  '7,Seven,Siete,Sept,Sieben,Zeven',
  '8,Eight,Ocho,Huit,Acht,Acht',
  '9,Nine,Nueve,Neuf,Nehn,Negen',  
];

// Initialize SBox with display and value fields  [, selectedIndex is optional]
//                  Populate args:  IDS,txtFld,valFld [,selectedIndex] 
                    Matches.Populate('SBoxM0',0,0,0);

Matches.shuffle();  Matches.Populate('SBoxM1',1,0);
Matches.shuffle();  Matches.Populate('SBoxM2',2,0);
Matches.shuffle();  Matches.Populate('SBoxM3',3,0);
Matches.shuffle();  Matches.Populate('SBoxM4',4,0);
Matches.shuffle();  Matches.Populate('SBoxM5',5,0);

</script>

</body>
</html>
You might note the specific function for this last example...
Code:
function getSBoxes() {
  var tarr = [];
  for (var i=0; i<arguments.length; i++) {
    tarr.push(document.getElementById(arguments[i]).value);
  } return tarr.join();
}
// Example:  var str = getSBoxes(IDS, [id0,id1,id2, etc...]);
// Collects users choices from any number of <select> tags with unique ID values.
Comments welcomed.