I have two text boxes t1 and t2 in an html page.
I’d like to copy t1 content to t2, using javascript on every keystroke done in t1.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ol’ school, since you added the “beginner” tag:
A more robust solution also uses the
changeevent (for those who paste via mouse right-click), and doesn’t inline the event handler logic: