Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

148
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda