167 of 264 menu

Proprietà tBodies

La proprietà tBodies memorizza un array di tutti tbody della tabella (possono essercene diversi).

Sintassi

tabella.tBodies;

Esempio

Otteniamo e iteriamo in un ciclo tutti i tbody della tabella:

<table id="table"> <thead> <tr> <th>header1</th> <th>header2</th> <th>header3</th> </tr> </thead> <tbody> <tr> <td>value</td> <td>value</td> <td>value</td> </tr> <tr> <td>value</td> <td>value</td> <td>value</td> </tr> </tbody> <tbody> <tr> <td>value</td> <td>value</td> <td>value</td> </tr> <tr> <td>value</td> <td>value</td> <td>value</td> </tr> </tbody> </table> let table = document.querySelector('#table'); for (let tBody of table.tBodies) { console.log(tBody); }

Vedi anche

  • proprietà tHead,
    che contiene thead della tabella
  • proprietà tFoot,
    che contiene tfoot della tabella
  • proprietà rows,
    che contiene le righe della tabella
  • proprietà cells,
    che contiene le celle della tabella
Italiano
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEnglishEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesia日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
Utilizziamo i cookie per il funzionamento del sito, l'analisi e la personalizzazione. I dati vengono elaborati in conformità con la Politica sulla privacy.
accetta tutto personalizza rifiuta