yo tenia una mesa
<table> <thead> <tr> </tr> </thead> <tbody> <tr> </tr> </tboday> </table> Quiero agregar una propiedad a <tr> dentro de <tbody> no <thead>
Después de agregar esta línea (<HTMLElement>document.querySelector('tr')).setAttribute("draggable", "true");
la mesa parece
<table> <thead> <tr draggable=true> </tr> </thead> <tbody> <tr> </tr> // note here there is no above mentioned property. I need to put here </tboday> </table> ¿Cómo puedo agregar draggable=true a <tr> dentro <tobdy>
Esto te ayudara
document.querySelector('tbody tr').setAttribute("draggable", "true"); <table> <thead> <tr></tr> </thead> <tbody> <tr>here </tr> </tbody> </table>