Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
176
rated 0 times [  183] [ 7]  / answers: 1 / hits: 93994  / 15 Years ago, thu, february 18, 2010, 12:00:00

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?



<html>
<label>First</label>
<input type=text name=n1 id=n1>
<label>Second</label>
<input type=text name=n1 id=n1/>
</html>

More From » html

 Answers
50
<script>
function sync()
{
var n1 = document.getElementById('n1');
var n2 = document.getElementById('n2');
n2.value = n1.value;
}
</script>
<input type=text name=n1 id=n1 onkeyup=sync()>
<input type=text name=n2 id=n2/>

[#97542] Monday, February 15, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
natalyah

Total Points: 371
Total Questions: 90
Total Answers: 105

Location: The Bahamas
Member since Wed, Apr 12, 2023
1 Year ago
;