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

239
Visualizações
Is is possible to display <style> contents as a string?

I can display the contents of a function using functionName.toString()

Is is possible to display the contents of the <style></style> section?

Using XXX.toString(), like maybe: styleName.toString()? Or something else?

I can't figure out how to reference the <style> contents.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Use the innerHTML or innerText property, just like any other DOM element.

document.querySelector("style").innerText

If you have multiple <style> elements you can give the one you want an ID and use that in the selector. If you want all of them, you can use document.querySelectorAll("style") and loop over them.

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