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

83
Views
desea cambiar los valores de la celda de la tabla html usando javascript usando eventlistner

Quiero hacer un juego de tic tac toe, tratando de agarrar todo el td usando querySelectorAll y usando eventlistner estoy tratando de manipular el 'td' pero muestra un error

aquí está el código html:

 <body> <h1> Welcome to tic tac toe game </h1> <button onclick="history.go(0)"> Restart </button> <table border="1" align="center" > <tr> <td> </td> <td > </td> <td ></td> </tr> <tr> <td> </td> <td ></td> <td ></td> </tr> <tr> <td> </td> <td ></td> <td ></td> </tr> </table>

JavaScript:

 let cell = document.querySelectorAll('td'); cell.addEventListner('click',function(){ cell.textContent = 'x'; })

Error : **

 tic_toe_game.js:2 Uncaught TypeError: cell.addEventListner is not a function at tic_toe_game.js:2:6

**

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!