We can do this using two different approach :

1. Using Actionfunction of VF and then rerender the outputPanel containing our text field
https://developer.salesforce.com/forums/?id=906F000000096tTIAQ
2. using Javascript to input the text in text input 
https://stackoverflow.com/questions/1085801/get-selected-value-in-dropdown-list-using-javascript