Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

209
Vistas
How to add a property/ styles to child nodes inside a parent element in angular

I had a table

<table>
 <thead> 
  <tr> </tr>
 </thead>
 <tbody> 
  <tr> </tr> 
 </tboday>
</table>

I want to add a property to <tr> inside <tbody> not <thead>

After I add this line (<HTMLElement>document.querySelector('tr')).setAttribute("draggable", "true");

the table looks like

<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>

How can I add draggable=true to <tr> inside <tobdy>

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

this will help you

document.querySelector('tbody tr').setAttribute("draggable", "true");
<table>
 <thead> 
  <tr></tr>
 </thead>
 <tbody> 
  <tr>here </tr>
 </tbody>
</table>

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda