/* write a fuction that sum the value of a select control */ function sumSelect() { var sum = 0; var select = document.getElementById('select'); for (var i = 0; i < select.options.length; i++) { sum += parseInt(select.options[i].value); } return sum; }