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

215
Visualizações
DISCUSSION : need your advise if i am doing this wrong or its ok to render html elements from javascript

I am optics network engineer, so apparently web development is not my career. but from time to time i build webapps to help myself & co-workers to do some automation stuff. In order to create the html part, I am trying as much as possible to avoid react & similar libs, since most of the time, i am building small apps. so i dont really need it. what i am depending on , is to create html templates with some JS variables then append it to my document. something like below :-

<div class="randomClass">${divLabel}</div>

Then when i would need to add this template to HTML from JS i do this :-

var template = `<div class="randomClass">${divLabel}</div>`
$("body").append(template )

of course with bigger HTML templates scale, so createElement is not easy since the HTML template will be much more bigger. so i see this is more easier than use createElement for each element and so on.

Is it ok to keep going with this ? or I am missing somepoint maybe impact me in future ?

Thanks awesomes.

about 4 years ago · Juan Pablo Isaza
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