电话号码有三条<密码>。 <代码>Text Box1 max length is 3,2nd s max length is 3
and 3rd max length is 4
. 用户类型 3 位数
,TextBox1
<代码>cursor transports natural to TextBox2
same mece with TextBox2
as well as textBox3. 我在<代码>keyup活动中处理这一功能。
问题在我新闻时
Ctl+a
Ctl+c
Ctl+v
曲线自动移至“条码”>Text Box3 条码>,因为“条码>Text Box 条码>上载至“条码”>Max Length 条码>,并将其移至“条码>。 我想将其保留在“条码”上。 任何想法?
My code is below.
<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();
}
}