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

396
Views
¿Cómo solucionar este error al hacer clic? (javascript)

estaba siguiendo el tutorial de youtube para eliminar mensajes en el chat e hice lo mismo que él y onclick no me funciona

 const newMessage = ref(database, 'messages/'); function deleteMessage(self){ console.log("test"); } onChildAdded(newMessage, (data) => { let string = data.val().message; string = string.replaceAll("<", "&lt").replaceAll(">", "&gt"); let msgDiv = '<message>\n' + data.val().time + " / " + data.val().name + ": " + string + '<delete>' + '<button onclick="deleteMessage(this);">' + '<span class="iconify" data-icon="ant-design:delete-filled"></span>' + 'Usuń' + '</button>' + '</delete>' + '</message>' let messages = document.querySelector("messages"); messages.innerHTML += msgDiv; })

obtuve: Error de referencia no capturado: deleteMessage no está definido en HTMLButtonElement.onclick ((índice): 1: 1)

¿alguna solución?

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!