In JavaScript:
document.getElementById('txtShipCity').value = document.getElementById('txtCity').value;
Sweeten it with jQuery:
$('#txtShipCity').val($('#txtCity').val());
Although you may have to use the ClientID two text fields, so your JS might look pretty unpleasant, for example:
document.getElementById('<%= txtShipCity.ClientID %>').value = document.getElementById('<%= txtCity.ClientID %>').value;
source share