KeyDown
<body onkeydown="kd();"></body>
function kd() { if(event.keyCode==9) { document.getElementById("btn").focus(); } }
<asp:button id="button1" tabindex="1" runat="server"/>
<body> <form id="form1" runat="server"> <script type="text/javascript"> var txt = document.getElementById("nameTextBox1"); if (txt != null) { txt.focus(); } </script> <div> <table> <tr> <td class="style1"> what is u r name : <asp:TextBox ID="nameTextBox1" runat="server"></asp:TextBox> </td> </tr> <tr> <td class="style1"> enter u r age : <asp:TextBox ID="nextTextBox2" runat="server" ontextchanged="nextTextBox2_TextChanged" > </asp:TextBox> </td> </tr> <tr> </tr> </table> </div> </br> <div> <asp:Button ID="Button1" runat="server" Text="on click" > </asp:Button> </div> </form> </body>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)