<script>
$('input.txt-name').change(function(){
    $('input.txt-name2').val($('input.txt-name').val());
});
</script>