This demo, in the input, is not required to interact with the server, only after the completion of all input, the user point ammonium Cai to verify. So here, write JavaScript to implement it.
Js:
Copy Code code as follows:
<script type= "Text/javascript" >
function Jumptonexttextbox (Currenttxtbox, Nexttextboxid) {
if (currentTxtBox.value.length >= 5) {
document.getElementById (NEXTTEXTBOXID). focus ();
}
}
</script>
Html Code:
Copy Code code as follows:
License Key:
<asp:textbox id= "Number1" runat= "Server" onkeyup= "Jumptonexttextbox" (This, ' Number2 ') "Width=" ></asp: Textbox>
-
<asp:textbox id= "Number2" runat= "Server" onkeyup= "Jumptonexttextbox" (This, ' Number3 ') "Width=" ></asp: Textbox>
-
<asp:textbox id= "Number3" runat= "Server" onkeyup= "Jumptonexttextbox" (This, ' Number4 ') "Width=" ></asp: Textbox>
-
<asp:textbox id= "Number4" runat= "Server" onkeyup= "Jumptonexttextbox" (This, ' Number5 ') "Width=" ></asp: Textbox>
-
<asp:textbox id= "Number5" runat= "server" MaxLength = "5" width= "></asp:TextBox>"