Netbyzz
<!-- CODE = #A087 --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>NETBYZZ A087</title> <link rel="stylesheet" href="style.css"> </head> <body> <input type="number" id="input1" maxlength="1" oninput="moveToNextField(this, 'input2')" /> <input type="number" id="input2" maxlength="1" oninput="moveToNextField(this, 'input3')" /> <input type="number" id="input3" maxlength="1" oninput="moveToNextField(this, 'input4')" /> <input type="number" id="input4" maxlength="1" /> <script src="script.js"></script> </body> </html>
body { text-align: center; margin-top: 140px; } input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input { width: 150px; height: 150px; text-align: center; margin: 10px; border: 2px solid rgba(0, 0, 0, 0.178); border-radius: 10px; font-size: 70px; outline: none; } input:focus { box-shadow: 0 0 10px 2px rgba(91, 2, 207, 0.545); border: 2px solid rgba(91, 2, 207, 0.482); }
function moveToNextField(currentInput, nextInputId) { if (currentInput.value.length === currentInput.maxLength) { document.getElementById(nextInputId).focus(); } }