Suppose an entry is made in a textbox. Is it possible to retain the same entered text in a second text box? If so, how is this done?
More efficiently it can be done as : For the one who will see the post now should use best practices of javascript.
<script>
function sync(textbox)
{
document.getElementById('n2').value = textbox.value;
}
</script>
<input type="text" name="n1" id="n1" onkeyup="sync(this)">
<input type="text" name="n2" id="n2"/>