Ya estoy inscrito ¿Todavía no tienes acceso? Nuestros Planes
Ya estoy inscrito ¿Todavía no tienes acceso? Nuestros Planes
1
respuesta

Almacenando muchos datos

<meta charset- "UTF -8">
<input/>
<button>Verificar si acertó con el secretoc/button>
<script>
1/var secreto Math. round (Math. random ()*10);
var secreto- 3,5,7,9]1
var input document. querySelector ("input");
input.focus ();
function veri ficar () {
if (parseInt (input. value) secreto1) {
alert ("Usted acert6");
else {
alert ("Usted erró");
input.value
input.focus ();
}
</script>
1 respuesta

A pesar de que pongo los valores correctos del arreglo va directo a "else" saben por que? ayuda!!!!!!


<meta charset="UTF-8">

<center>
<h1>Ervin´s Secret </h1>
<p>11 Ways to Check if a Website is Legit or Trying to Scam You
1 | Carefully Look at the Address Bar and URL. ...
2 | Check the Contact Page. ...
3 | Review the Company's Social Media Presence. ...
4 | Double Check the Domain Name. ...
5 | Look Up the Domain Age. ...
6 | Watch for Poor Grammar and Spelling. ...
7 | Verify the Website Privacy Policy.</p>
<input>
<button>Verify </button>
<script>


 // var secreto=Math.round(Math.random()*10);
  var secreto=[5,3,7,8];
  var input=document.querySelector("input");  
  input.focus();

 function verify(){
      if(parseInt(input.value)==secreto){
      alert("But you right");
  }

  else{
    alert("Wrong ");
  }
  input.value= " ";
  input.focus();
 }
 var button=document.querySelector("button");
 button.onclick=verify;



    //function saltarLinea() {
      //  document.write("<br>");    
        //document.write("<br>");    
      //  document.write("<br>");    
    //}  
    //
    //}
//function imprimir(frase) {
        //document.write(frase);
       //saltarLinea();
</script>
</center>