i want to get the selected option from select box.I have this code:
<select id="sel">
<option selected>Seciniz</option>
<%for(int i=1;i<k+1;i++){kullancounter++; %>
<option class="up"><%=ka[i] %></option>
<%} %>
</select>
<input type="button" onclick="katsec()" value="Ekle">
<script>
function katsec(){
alert('asd');
var a=document.getElementById('sel').value;
alert(a);
document.getElementById('tak').innerHTML=a;
}
</script>
but it opens alert but there is nothing in alert.What should i do?Thanks