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

107
Views
Evitar que las letras de la entrada no funcionen como quiero

Tengo el siguiente código: https://codepen.io/ion-ciorba/pen/MWVWpmR

El problema está en el valor de "Suma solicitata", allí puede hacer clic y editar el valor, pero al intentar reemplazar un número dentro del entero, el número recién reemplazado irá al final de este. Como puedo arreglar esto, creo que es por eso:

 var preventOnlyLetters = function (event) { $(this).val($(this).val().replace(/[^\d]+/, "")); }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Está sucediendo porque está activando esta función tanto al presionar una tecla como al presionar una tecla. Solo debe tenerlo en keyup o keypress. Pero creo que sería mucho mejor si solo haces el type="number"

about 4 years ago · Juan Pablo Isaza Report
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!