Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
¿Cómo mostrar la alerta de arranque durante 5 segundos, incluso si la página se recarga en ese momento?

Quiero mostrar una alerta durante 5 segundos al hacer clic en un botón, pero el botón es de tipo = "enviar" con método = "publicar". Así que esto funciona, pero solo durante unos nanosegundos porque después de que la página se vuelve a cargar y no cuenta. y mostrar los segundos restantes de alerta para mostrar

Aquí está mi código de alerta

 <div class="alert alert-danger balance" id="inbalance" role="alert" > <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> <h4 class="alert-heading">Order <b>Unsuccessfull</b></h4> <p>Hey,Your order for car is Unsuccessful due to <b>insufficient balance </b> </p> <hr> </div>

Aquí está mi código para mostrar alerta

 function myAlertBottom(){ $("#inbalance").show(); setTimeout(function(){ $("#inbalance").hide(); }, 5000);

Y código de botón

 <button type="submit" class="btn btn-success btn-lg buy" onclick="myAlertBottom()" style="width:50%;" th:disabled="${1 eq g2}">BUY</button>

Código de formulario en HTML

 <form action="" th:action="@{/g2form}" th:object= "${game2data}" method="post"> </form>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!