please post the code that you have so far so that better answers can be given and folks have something to work with.
and its probably necessary to explain more what you really want to achieve - its not enough information about it there and leaves too much room for interpretation like: May be you are asking about how to set the text of a textbox with a selected value from a select element on a webpage? In which situation should it happen? while selecting or on some other event during page-lifetime? Or do you mean to do something completely different - and i just misinterpreted your question?