I am trying to add input on one textbox to another textbox at the same time using jquery keydown . For some reason its not working, I'm new to coding, so help and criticism will be appreciated ..!
code:
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Text Box1"></asp:Label><br/> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br/><br/> <asp:Label ID="Label2" runat="server" Text="Text Box2"></asp:Label><br/> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> </div> </form> <script> $('#TextBox1').keydown(function () { $('#TextBox2').val($(this).val()) }) </script>

source share