Textboxes電話番号は 3 つあります。Textbox1 max length is 3、2nd's max length is 3および3rd max length is 4。ユーザーが自動的に入力three digitsすると、TextBox3 と同様に同じことが起こります。イベントでこの機能を処理しています。TextBox1cursor movesTextBox2TextBox2keyup

問題は、押すと
Ctl+a
Ctl+c
Ctl+v
カーソルは、それに到達して next に移動するTextbox3ため、自動的に移動します。つけておきたい。何か案は?TextboxMax LengthTextboxTextBox1
私のコードは以下です。
<asp:TextBox runat="server" ID="tbPh2" MaxLength="3" onkeyup="Mainautotab2(this, 0, event);"/>
<asp:TextBox runat="server" ID="tbPh22" MaxLength="3" onkeyup="Mainautotab2(this, 1, event);"/>
<asp:TextBox runat="server" ID="tbPh222" class="midium" MaxLength="4" />
function Mainautotab2(original, destination, evt) {
if (document.getElementById('<%= tbPh2.ClientID%>').value.length == 3 && document.getElementById('<%= tbPh22.ClientID%>').value.length == 3) {
if (destination == 0)
document.getElementById("<%=tbPh22.ClientID %>").focus();
if (destination == 1)
document.getElementById("<%=tbPh222.ClientID %>").focus();
}
}