If you encounter such a problem in a project, you must enter only one digit in the input box and enter the following code after reading the information:
<Div class = "main-out">
<P class = "identifying-title"> enter the verification code provided by the enterprise </p>
<Div class = "pass-box">
<! -- Black horizontal box -->
<Div class = "pass-line">
<Div class = "line-box"> <span class = "line-one"> </span> </div>
<Div class = "line-box"> <span class = "line-two"> </span> </div>
<Div class = "line-box"> <span class = "line-three"> </span> </div>
<Div class = "line-box"> <span class = "line-four"> </span> </div>
<Div class = "line-box"> <span class = "line-five"> </span> </div>
<Div class = "line-box"> <span class = "line-six"> </span> </div>
</Div>
<! -- Enter the verification code box -->
<Div class = "passInput" id = "on">
<Input type = "text" class = "inputCont-one" maxlength = "1"/>
<Input type = "text" class = "inputCont-two" maxlength = "1"/>
<Input type = "text" class = "inputCont-three" maxlength = "1"/>
<Input type = "text" class = "inputCont-four" maxlength = "1"/>
<Input type = "text" class = "inputCont-five" maxlength = "1"/>
<Input type = "text" class = "inputCont-six" maxlength = "1"/>
<! -- <Input type = "text" onkeyup = "this. value = this. value. replace (/\ D/g, '')" onafterpaste = "this. value = this. value. replace (/\ D/g, '')" maxlength = 1> -->
</Div>
</Div>
</Div>
$ (". InputCont-one"). focus ();
$ (". Line-one"). hide ()
Onload = function (){
Var txts = on. getElementsByTagName ("input ");
For (var I = 0; I <txts. length; I ++ ){
Var t = txts [I];
T. index = I;
T. setAttribute ("readonly", true );
T. onkeyup = function (){
If (this. value = this. value. replace (/\ D/g ,'')){
Var next = this. index + 1;
If (next> txts. length-1) return;
Txts [next]. removeAttribute ("readonly ");
Txts [next]. focus ();
$ (". Line-box"). eq (next). find (". line"). hide ();
} Else {
$ (This). focus ();
}
}
}
Txts [0]. removeAttribute ("readonly ");
}
& Nbsp;