f1 = function () { //var selected_val = document.getElementById(test).value; var obj = document.getElementById("test"); var option_val = obj.options[obj.selectedIndex].value; alert(option_val); alert("OK"); }
options-0
options-1
options-2
options-1
options-2