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

219
Views
Error de Javascript (no encontrado) al enviar el formulario

Estoy tratando de practicar javascript básico en codepen, así que hice esta calculadora básica. cuando hago clic en el botón Agregar, la respuesta correcta se muestra correctamente en el navegador, pero desaparece repentinamente y aparece el error not found .

Aquí está mi código:

 let btn = document.getElementById("add") let result = document.getElementById("result") btn.addEventListener("click", () => { let num1 = parseFloat(document.getElementById("num1").value); let num2 = parseFloat(document.getElementById("num2").value); result.innerHTML = num1 + num2 })
 <form action=""> <h1>Add two numbers</h1> <input id="num1" type="number" required> <input id="num2" type="number" required> <input type="submit" id="add" value="Add"> </form> <div> <h2 id="result"></h2> </div>

Intenté revisar la consola pero no veo nada.

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!