Commit 87e1e4c4 authored by Rodrigo Diez's avatar Rodrigo Diez

Cambio de focus

parent f96e1c74
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type=number] {
-moz-appearance:textfield;
}
\ No newline at end of file
......@@ -6,6 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body class="bg-light">
......@@ -111,15 +112,15 @@
<div class="row mb-5">
<div class="offset-md-1 col-md-3 mb-3">
<input type="text" class="form-control text-center" id="propio0" placeholder="" value="" required>
<input type="number" class="form-control text-center numeros" id="propio0" placeholder="" value="" min="0" max="9" required>
</div>
<div class="col-md-3 mb-3">
<input type="text" class="form-control text-center" id="propio1" placeholder="" value="" required>
<input type="number" class="form-control text-center numeros" id="propio1" placeholder="" value="" min="0" max="9" required>
</div>
<div class="col-md-3 mb-3">
<input type="text" class="form-control text-center" id="propio2" placeholder="" value="" required>
<input type="number" class="form-control text-center numeros" id="propio2" placeholder="" value="" min="0" max="9" required>
</div>
</div>
......
......@@ -218,6 +218,7 @@ iniciar = document.getElementById("iniciar");
detener = document.getElementById("detener");
sorteos = document.getElementById("sorteos");
check = document.getElementById("check");
numeros = document.getElementsByClassName("numeros");
iniciar.addEventListener("click", (e)=>{
iniciar.preventDefault;
......@@ -245,4 +246,11 @@ check.addEventListener("click", (e)=>{
});
for (i = 0; i < 3; i++){
numeros[i].addEventListener("keyup", (e)=>{
console.log(e.target);
e.target.parentNode.nextElementSibling.firstElementChild.focus();
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment