Getting selected option value from Listbox

On Select of listbox, text box value ( data ) will change

Student Name
Details
HTML
<select id=student class='form-control'>
<option value='Alex'>Alex</option>
<option value='Raju'>Raju</option>
<option value='Raman'>Raman</option>
</select></div><div class='col-md-4'> Details
<input type=text name=t1 id=t1 class='form-control'>
JQuery
<script>
$(document).ready(function() {
$("#student").change(function(){ // change function of listbox
var sel = $("#student").val(); // reading listbox selection
$("#t1").attr('value',sel); // keeping in a text box
});
});
</script>