<select id="v1">
<option>amit</option>
<option>work</option>
<option>desk</option>
</select>
<button>Click</button>
$(document).ready(function(){
$('button').click(function(){
var s = document.getElementById('v1');
var v1 = s.options[s.selectedIndex].value;
alert(v1);
});
});
No comments:
Post a Comment