1
The code below causes the user to type in a given input field, it jumps to the other field automatically:
<form class="form-inline">
<div align="center">
<div class="form-group">
<input type="password" class="form-control" style="width: 70px" maxlength="1" id="campo1" value="" onkeyup="if(this.value.length >= 1) { campo2.focus(); }">
</div>
<div class="form-group">
<input type="password" class="form-control" style="width: 70px" maxlength="1" id="campo2" value="" onkeyup="if(this.value.length >= 1) { campo3.focus(); }">
</div>
<div class="form-group">
<input type="password" class="form-control" style="width: 70px" maxlength="1" id="campo3" value="" onkeyup="if(this.value.length >= 1) { campo4.focus(); }">
</div>
<button type="submit" id="campo7" class="btn btn-default">Acessar</button>
</div>
</form>
So far so good, but as I would do in case the user wanted to delete the previous fields by pressing the Backspace key?
Thank you
Perfect Isac. It worked!! Thank you!
– user24136