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

125
Views
Lo que quiero es obtener la información diferente de cada tarjeta en textArea presionando el botón correspondiente que tiene la misma clase

Por el momento, obtengo todo el tiempo la misma información que proviene de la primera tarjeta.

 const name = document.querySelector(".name").textContent; const partNumber = document.querySelector(".part-number").textContent; const price = document.querySelector(".price").textContent; const textArea = document.querySelector("#message"); let inputQuantity = document.getElementById("quantity"); const buyButton = document.querySelectorAll(".buy-button"); for (let i = 0; i < buyButton.length; i++) buyButton[i].addEventListener("click", function () { inputQuantity = inputQuantity.value; textArea.innerHTML = `I WANT TO BUY ${inputQuantity} ${name}(S) ${partNumber} ${price} Thank You `; });

para pasar la información de cada tarjeta a textArea presionando el botón correspondiente.

about 4 years ago · Santiago Trujillo
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!