<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TABLA DE MULTIPLICAR</title>
</head>
<input/>
<button>verificación inicio de secion</button>
<Script>
//var secreto = Math.round(Math.random()*10);;
var secreto =[3, 5, 7, 9];
var input = document.querySelector("input");
input.focus();
function verificar() {
var encontrado = false;
for (var i = 0; i < secreto.length; i++) {
if (parseInt(input.value) == secreto[i]) {
alert("acertaste");
encontrado = true;
break;
}
}
if (encontrado == false) {
alert("erraste");
}
input.value = "";
input.focus();
}
var button = document.querySelector("button");
button.onclick = verificar;
</Script>
</html>