<table> <tr> <td class="style1"> <asp:TextBox ID="txtUser" runat="server" Font-Size="Small" AutoPostBack="true" TabIndex="2" onkeydown="onFocus(event);" Text ="" ></asp:TextBox> </td> </tr> <tr> <td class="style1"> <asp:TextBox ID="txtPassword" ClientID="txtPassword" runat="server" Font-Size="Small" AutoPostBack="true" TextMode="Password" TabIndex="3" > </asp:TextBox> </td> function onFocus(event) { var e1 = document.getElementById('<%=txtUser.ClientID%>').value; if (e1.length > 5) { if (event.keyCode == 13) { // RETURN event.keyCode = 9; return event.keyCode; } } } </tr> </table>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)