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

261
Views
Recibir un error [object HTMLInputElement] al intentar convertir caracteres

Tengo el siguiente código para el cual estoy tratando de convertir la entrada ingresada por un usuario para reemplazar ciertos caracteres (e con un 3 y t con un 7) pero en cambio, recibo un error [object HTMLInputElement] en mi salida.

 function ReplaceChars() { var json = JSON.parse(localStorage.getItem("registration")); var characters = json['charsEntered']; var percentage = ""; var total = ""; result = characters .replaceAll(/e|E/g, "3") .replaceAll(/t|T/g, "7") total = characters.length; if (result.match(/e|E|t|T/g) == null) { roundedPercentage = 0.00; result = charsEntered; } else { percentage = ((characters.match(/e|E|t|T/g).length) / total) * 100 roundedPercentage = percentage.toFixed(2); } console.log(result); $("#charsConverted").val(result); $("#percentage").val(roundedPercentage + "%"); }

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!