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

127
Views
Quiero cambiar el texto de la tabla a un enlace

Quería cambiar el valor del archivo adjunto en la tabla a un enlace en el que se puede hacer clic porque los enlaces son muy largos, obtuve el enlace de Firebase firestore y quería cambiarlo a un enlace en el que se puede hacer clic

este es el archivo JavaScript

 var attendantNumber = 0; var tbody = document.getElementById('tbody1'); function AddItemToTable(fname, lname, email, phoneNumber, country, attachment){ let trow = document.createElement('tr'); let td1 = document.createElement('td'); let td2 = document.createElement('td'); let td3 = document.createElement('td'); let td4 = document.createElement('td'); let td5 = document.createElement('td'); let td6 = document.createElement('td'); let td7 = document.createElement('td'); td1.innerHTML = ++attendantNumber; td2.innerHTML = fname; td3.innerHTML = lname; td4.innerHTML = email; td5.innerHTML = phoneNumber; td6.innerHTML = country; td7.innerHTML = attachment; trow.appendChild(td1); trow.appendChild(td2); trow.appendChild(td3); trow.appendChild(td4); trow.appendChild(td5); trow.appendChild(td6); trow.appendChild(td7); tbody.appendChild(trow); } function AddAllItemsToTable(TheAttendant) { attendantNumber = 0; tbody.innerHTML = ""; TheAttendant.forEach(element => { AddItemToTable(element.FirstName, element.LastName, element.Email, element.PhoneNumber, element.Country, element.attachment); }); } async function GetAllData() { const querySnapshot = await getDocs(collection(db, "attendants")); var attendants = []; querySnapshot.forEach(doc => { attendants.push(doc.data()); }); AddAllItemsToTable(attendants); } window.onload = GetAllData;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Su innerHTMl necesita ser un enlace. Algo como

 td7.innerHTML = '<a href="https://www.google.com">'+attachment+'</a>';
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!