使用组合框获取文本字段的值

I want to get value into text field from database when the value is selected from combo box

p.s: the value in combo box and the value I want into text field come from same table in database

if the value in the select box is the same as the value you want in the text field, you can do this with jQuery:

$("select").on('change',function(){
    $("input").val($("select option:selected").val());
});​

just replace select and input with selectors for those fields, and it's all handled client-side, here's a demo: http://jsfiddle.net/JKirchartz/JwjX3/

my friend said that:

$('select').change(function(){
            var t = $('select').val();
            $('input').val(t);            
          });