Cara Mendapatkan Nilai dari Select Multiple di JS
document.getElementById('submit').onclick = function() {
var selected = [];
for (var option of document.getElementById('pets').options) {
if (option.selected) {
selected.push(option.value);
}
}
alert(selected);
}
Quaint Quelea