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

170
Visualizações
Need code for template file to generate html file with different title and html file name based on user input

I want to generate a template html file, based on variable name (which will be changing dynamically based on user input) the title and some other variable names will be replaced from user input. How to achieve this?

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

0

If I understood your problem, you have an application, from which you are taking inputs from users to create an HTML template.

You can use javascript string literals

createHTMLTemplate(userInput){
return `<!DOCTYPE html>
<html>
<head>
<title>${userInput.title}</title>
</head>
<body>

<h1 style="background-color: red;">Hello World!</h1>
<p>${userInput.anyothervariable}</p>

</body>
</html>
`
}
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