Here is what you looking for
Put this code in Header section.
<script type="text/javascript">
function myValue(t1) {
document.getElementById("<%=t2.ClientID %>").value = t1.value;
}
</script>
Put the code in Body
<input id="t1" type="text" runat="server" onkeypress="javascript:myValue(this)" />
<input id="t2" type="text" name="name" runat="server" value="" />
I hope this helps you well.