Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda