function comenzar(){
var caja=document.getElementById("caja");
var numero=document.getElementById("numero");
numero.addEventListener("change",background,false);
setInterval(background(),50);
}
function background(){
valores=[1,3,5];
for (i=0; i<valores.length;i++){
if (numero.value == valores[i]){
caja.style.background="red";
}
else{caja.style.background="#000";}
}
}
window.addEventListener("load",comenzar,false);