you can try this
function chkind(){
var dropdown1 = document.getElementById('dropdown1');
var textbox = document.getElementById('textbox');
if(dropdown1.selectedIndex == 0){
textbox.value = "hi";
} else if(dropdown1.selectedIndex == 1) {
textbox.value = "bye";
}
}
try this also to get index value
var a = dropdown1.options[dropdown1.selectedIndex].value;
like this
function chkind(){
var dropdown1 = document.getElementById('dropdown1');
var a = dropdown1.options[dropdown1.selectedIndex].value;
var textbox = document.getElementById('textbox');
textbox.value = a;
}