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

167
Vistas
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 Respuestas
Responde la pregunta

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