Home > Article > Web Front-end > How to implement simultaneous input in two text boxes
This article mainly brings you an example of how to input two text boxes at the same time. The editor thinks it is quite good, so I will share it with you now and give it as a reference for everyone. Let’s follow the editor to take a look, I hope it can help everyone.
The example is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title></title> </head> <body> <script language="javascript"> function copyob1toob2(){ document.all["ob_text_2"].value=document.all["ob_text_1"].value } </script> <input type="text" id="ob_text_1" size=20 onkeyup="copyob1toob2()"> <input type="text" id="ob_text_2" size=20> </body> </html>
Related recommendations:
Detailed explanation of real-time monitoring of the number of words entered in the text box
How to make the HTML text box read-only effect
Introduction to the JavaScript method of realizing that the text box can only input numbers
The above is the detailed content of How to implement simultaneous input in two text boxes. For more information, please follow other related articles on the PHP Chinese website!