How to set Default value in autocomplete implemented textbox?
Change your following line
$('#txtcity').val() = item.value;
to
$('#txtcity').val(item.text);
you can set the value like this after initializing Autocomplete:
$( "#txtcity" ).autocomplete({
// do whatever
}).val('Banana').data('autocomplete')._trigger('select');
Updated Example: http://jsfiddle.net/55jhx/1/