The code below causes the user to type in a particular 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, all right, but how would I do if the user wanted to delete the previous fields by pressing the Backspace key?
Thank you