function clearE() {
document.getElementById('selection').options.length = 0;
document.getElementById('selection').options[0] = new Option('Empty now', 'e', false, true);
// new Option(text[, value[, defaultSelected[, selected]]]);
}
function fill() {
var i;
for (i = 0; i < 10; i++) {
document.getElementById('selection').options[i] = new Option('option ' + i, 'opt' + i);
}
}
…
]]>