<script language="JavaScript">
function Bname() {
var B=document.form1.B.value;
if (B.length < 1) {document.form1.A.value=""; return false;} else {document.form1.A.value=B; return true;}
}
</script>
<form name="form1" action="" method="Post">
<input type="text" name="B" onkeyup="Bname();" />
<input type="text" name="A" />
</font>