Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

250
Vistas
how do I get the value of an input and use it in an if-then statement?

I want to make a currency redeemer in my file. I am trying to use javascript to get the input of the text, but I get the same messages: Syntax Error and Reference Error. What does this mean and how do I fix it?

Here is my exact code:

<html>
    <head>
        <title>Alante de Nuza - Made in Nuza</title>
        <script>
            function onClick1() {
                if document.getElementById("Input1").value == "C120CC9" {
                    document.getElementById("Paragraph1").innerHTMl = "Code Succesful!";
                } else if {
                    document.getElementById("Input1").value == "X999XX9" {
                        document.getElementById("Paragraph1").innerHTMl = "Very Sneaky...";
                    }
                }
            }
            
        </script>
    </head>
    <body>
        <h1 style="font-family:cursive;">Alante de Nuza redeem</h1>
        <hr>
        <input id="Input1" type="text" placeholder="e.g. X999XX9" style="width:500px; height:100px; font-size:70px; text-align:center;">
        <br>
        <br>
        <button onclick="onClick1()" style="border-radius:50px; text-align:center; font-size:60px; font-family:cursive; width: 300px; height:100px;">REDEEM</button>
        <p id="Paragraph1"></p>
    </body>
</html>
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda