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

131
Views
¿Cómo resuelvo el error => "No se pueden establecer propiedades de nulo (configurando 'innerHTML')"?

https://codepen.io/bSwastik6/pen/QWQgYPO?editors=1010

Hay algún problema con el código JAVASCRIPT que no puedo resolver. Será útil si verifican el error en el código.

ERROR: {TypeError no detectado: no se pueden establecer propiedades de nulo (configurando 'innerHTML')}

 // Variables var tenspart = 0; var minpart = 0; var secpart = 0; var time; // Node Selector var start = document.querySelector(".start"); var stop = document.querySelector(".stop"); var reset = document.querySelector(".reset"); var tenth = document.querySelector(".tens"); var minute = document.querySelector(".min"); var second = document.querySelector(".second"); // Add Event Listener start.addEventListener("click", () => { clearInterval(time); time = setInterval(watchCounter, 10); }); stop.addEventListener("click", () => { clearInterval(time); }); reset.addEventListener("click", () => { clearInterval(time); tenspart = 0; minpart = 0; secpart = 0; tenth.innerHTML = "0" + tenspart; second.innerHTML = "0" + secpart; minute.innerHTML = "0" + minpart; }); // Event Function var watchCounter = function () { tenspart++; tenth.innerHTML = tenspart; if (tenspart < 9) { tenth.innerHTML = "0" + tenspart; } if (tenspart > 99) { secpart++; second.innerHTML = secpart; if (secpart < 9) { second.innerHTML = "0" + secpart; } tenspart = 0; } if (secpart > 59) { minpart++; minute.innerHTML = minpart; if (minpart < 9) { minute.innerHTML = "0" + minpart; } secpart = 0; } };
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Su nombre de clase para segundos div es "sec", pero está apuntando a ".segundo" dentro de JavaScript.

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!