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

141
Vistas
Change css with if statement without submitting button

I am creating an user register form with usernames just like Instagram where the website automatically checks if your input (username) already exists in the database and if it exists its changing the css after a second by example a font awesome icon checked and font awesome icon cross / times, how can i do this without using a submit button?

the code i have now is:

<form method="post"> <div class="field">
  <span class="fas fa-user"></span>
    <input name="email" required type="text" value="<?php if(isset($_COOKIE["email"])) { echo $_COOKIE["email"]; } ?>">
           <label>Username</label>
           <span id="<?php **wait 1 second and if input (username) is in database change the css to "cross" else if username is not in database change the css to "checked" **  ?>"></span>
                        </div> </form>

so the part I need help with is defining the input so i can check it without the use of a submit button. I do not need helping with checking in the database and changing the css state

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